The Evolution of a Developer’s Relationship with Clean Code

Over the years, when teaching the principles of clean code, I have observed students and developers go through several phases in how they handle this topic. It just felt right to present it to them as a meme 🙂

Sarcasm:
When starting to write code, some students view clean code principles as useless, only for perfectionists who have “a lot of time on their hands”.

Denial:
After some user testing and the rise of bugs, some may blame the unclear requirements or the team’s lack of expertise rather than their own code.

Acceptance:
After a few months, many developers struggle to read their own code or make changes efficiently. Only then, a bulb lights up: “maybe those who talked about clean code have a point”.

Throwaway and Rewrite:
Some developers will get excited about their new realization of the importance of clean code. They plan to start over and aim to rewrite all the work from scratch, and here comes the infinite loop of rewrites 😉

Make it work and refactor:
After a while of running in circles, developers will stop to take a deep breath. While doing so, the process will start becoming more appealing to them. It is actually quite simple: make things work, follow the best practices and plan for a process of continuous refactoring and code reviews. This is where we say: welcome to the honest and practical attitude towards the inevitable technical debt.

These phases are not necessarily sequential and there is no guarantee that one will get out of the sarcasm phase 😉

As someone who has written their fair share of ugly code in the past, I understand and appreciate the point of view of developers in each phase. I just never give up 😉

I left out the over-engineering phase on purpose because that it is soo much fun and needs a meme of its own 🙂

Software Engineering is Fun

Yes, things go wrong in many ways when you are building large software systems. But, I can’t remember more fun moments than the ones I had working on tough software projects. This is especially true with multiple teams working on the same project. I guess the complexity of the interactions result in even more fun 🙂

I am an agile person in my life and in the way I work with software. So, when I teach SE, I am strictly agile. I usually follow scrum but of course a customized version according to the settings of the work. Even though my students worked hard and overnight on the projects but I dare say that we all had awesome memories out of it.

Let me share some comics that we developed throughout the years from our work in software engineering. I came up with the ideas and an ART student in our Uni  (Loai Nabil) executed them.

there are three characters in the comic, the Scrum master (the big guy), the developer (the little cute guy) and the product owner (the guy with a moustache)

scenariodemoproductownertest

“Find the Treasure” – a CS4HS Funded project

Looking back in time, I feel blessed that I picked computer science as my major. I can’t say that I was even interested in computers in anyway before I entered the University. There was much randomness in my choice as I loved all branches of science. Now, as time goes by and after a masters and a PhD in computer science, I can’t imagine a better choice. It is simply an open door to a world that can never be dull. It is overwhelming sometimes but you will always feel alive 🙂

School students don’t know much about what computer science is. Computer scientists can sometimes be confused with people who fix computers or just get the internet to work. There is much depth to the field that is missed in people’s general knowledge. After a discussion with one fresher student at the GUC, I got the idea of why not just introduce the concepts of computer science as games to high school students. They can experience the ideas behind how the internet works, how modem works, algorithm and much more. They can do all this without using a computer at all. I was inspired in this by the computer science unplugged activities site.

The idea became real when I got a grant from Google (CS4HS) to do this specific activity. We shaped the activity as a treasure hunt among groups from many public schools in Egypt. We called it “fakar tewasal”- فكر توصل . It is an Arabic name and its English translation is: think and you will reach your destination. Each group of students gets a map and in order to find the clue for the next step on the map, they have to solve a puzzle. The puzzle requires them to finish successfully a CS activity. They are supposed after the activity to learn a new concept in computer science, for example what is an algorithm, how modems work, how images are transferred a network, and more …

The students don’t use computers at all. They just play physical games to solve the problem. The ideas for the games were taken from the website CS unplugged.

Eventually, the map will lead them to a place where they find the treasure. The treasure this time was a lenovo tablet for each team member. Thanks to the Google grant and Bdaya group, we were abbe to turn this activity to a really fun and educational activity. Some ART students at the GUC helped us document the day in video.

A trailer done for the event:

And another trailer

Documentation of students need to do in the game

Day documentation

An Example of one of the games

البحث عن الكنز :)

اثبتت الأبحاث العالمية أن التعليم عن طريق الانشطه الحركية و الألعاب لها تأثير أعظم في تثبيت المعلومات و دعم الإبتكار عند الطلبة. حان الوقت أن نغير طرقنا التقليدىه في التعليم. و من هذا المنطلق، ينظم فريق من الجامعة الألمانية نشاط ضخم يعلم نظريات الحاسب عن طريق العاب و أنشطة حركية تطلب من الطالب أن يلعب و- يفكر فقط، بدون إستخدام أي أجهزة إلكترونية. هذا النشاط منظم على شكل لعبة بحث عن كنز ليزيد الحماس عند الطلبة. إستخدم فريق التنظيم فرصة تمويل تعرضها جوجل للمدارس حول العالم لتمويل هذا النشاط. تم الموافقة على التمويل الحمدلله و نحضر الأن لهذا النشاط في يوم ٢٩ يونيو. سوف يشاركنا طلبة من خمس مدراس حكومية و بمساعدة فريق من طلاب المدارس النشيط جداً يدعى (ادس). نتمنى أن نظهر طريقة جديدة للتعليم من هذا النشاط و نتمنى نشرها لكل المواد العلمية و اعادتها في كل صيف لطلاب المدراس.

Summer Camp – One week left

In the last two weeks, the campers were able to achieve alot 🙂 Even though it was a little bit Hot and we are mostly busy during Ramadan, but we are getting things done.

1- You might think that the Python team is very slow due to their “zawa7ef” name but believe it or not, they are the fastest and most accomplished team so far 😉 Thanks to the effort of Ramy Wafa who is their supervisor, they are cool Python and Django developers now and working on luxury tasks 🙂

2- The ideas management team, coolsoft, was able to finally get things off the ground and learn that things are not perfect. They learned the things that could happen during deployment and now their system is up and running ideas.g-osc.com … feel free to have a look around and report any bugs here ….http://code.google.com/p/coolsoft-11/

3- The Smarter Scrum team, diversity-a, has also done a great job and the system is FINALLY up and running after over a year of hoping to do so 🙂 It is now on scrum.g-osc.com … Again feel free to take a look and report any bugs here …http://code.google.com/p/ss-scrum-tool/

4- The Student entrepreneurship network team has accomplished alot. Now, we have an interesting prototype for our network. The team had to learn Drupal and overcome many challenges related to its use. Very soon, we will have something live.

5- Last but not least, you will read about the “El-Nazer” team very soon in the news :). The teacher empowerment initiative now has a name and a dedicated blog: egedu.wordpress.com … A school visit was arranged and 4 modules are being prepared for a training during September. What we reached so far is really promising Insha allah 😉 Alot of opportunities are opening for work in this team so feel free to join us if you want to. More information about the modules here.

6- The deployment team, Gomaa and Saher, are our champs during the whole process. Let us just say that they would like to see less of our problems at this moment 😉

There is more to come. Alot of baraka in this little time in my opinion 😉 and still one week to go.

Summer camp – Week One

Every year, we have our summer camp at the GUC. The aim is to learn something new or continue software systems started the semester before. However, this year is different. In addition to learning and exploring, we aim to benefit the community somehow. After all, this year is a very special year to all Egyptians. We are different. We feel we own the country. It is our country and we want to make it better as much as we want to improve our own selves. This year’s summer camp will include a group of students who will work with me on a pilot project to enhance education in Egypt. Don’t ask me how 🙂 the answers will yet to come. We will adopt the philosophy behind all startups which is simply launch fast, fail fast, don’t worry about breaking things, Go Go Go Go Go 🙂

We also have another group who are working on establishing an entrepreneurship network for students or Egyptian youth. It is a way to connect, guide, interact, review, couch, fund young entrepreneurs. It will be an interactive communication channels for all entrepreneurs and it will connect them with experienced ones to get them on the right path.

Our camp also includes Python development group (El Zawa7ef) led by Ramy Wafa and a deployment Champ mentored by Saher El neklawy. Two more groups will be working on finishing necessary software that started as student projects: Ideas Management (coolsoft) and Scrum management tools (diversity). We aim for our students to use the deployed systems in regular courses.

In the first week, we had

    2- El Zawa7ef (Python team) comfortably developing with python
    3- Ideas Management and Scrum management tool getting on their feet for deployment this week.
    4- Student Entrepreneurship network bringing in great results and looking for an open source platform
    5- We had Karim Diaa, the co-founder of Mash come speak to us
    6- The Teacher Empowerment team is in contact with a school now and have a plan (believe it or not) 🙂
    Our camp is usually full of fun activities. So far, we only had one which is a Kinect Tournament that was won by team Diversity (Sharif, Dina, Dalia, Natallie, abdallah and Maryam)

Our calendar for upcoming events is published on g-osc’s home page, so check it out for more info.

Google is reaching out for academics in MENA

After attending a couple of events organised by Google, I can see clearly that Google is eagerly reaching out for academics in MENA. I didn’t get that feeling just by reading about such opportunities online. Meeting Googlers and having a face to face discussion suddenly added alot of enthusiasm and clarity that weren’t felt from the online pages.

So, many people are asking me about these opportunities. I thought I should summarise what I know so far and the related links. First, there is a main website for Google Programs in MENA. The website is full of events, activities and resources..

There is a list of possible research awards available for MENA faculty, The key is to present something creative and innovative. It is a big big plus if you find a Googler who is interested in your topic and willing to get involved or give you tips. Also, your idea should somehow relate to Google’s current interests. By the way, the grant is not for overhead expenses. You will notice that the topics are so many so they cover almost everything in computer science

They also offer support for attending conferences (if well justified) or for organising conferences either through giving talks or sponsoring the event. There is more and more about encouraging students (undergrad or postgrad) to apply for internships and to become Google ambassadors in the University.

It is clear that Google is trying to motivate faculty members to become active and visible in order to join their active community. Faculty members can be selected to attend the faculty summit or other events. Also, their profile will affect their application for visiting professor or post doc opportunities as far as I understand.

They also offer some interesting resources. For example, Google code university has some interesting courses with exercises and labs there/. I knew about google university before and actually what I like the most about it is the curriculum search. It is seriously awesome You can directly search online course materials.

Google can support acadmecis who are working in Android through their AndroidEDU program. All you need is to email your region contact stating the details of your request.

Oh and I want to make sure I tell everyone about Google research Blog It is extremely interesting …you will benefit alot from following it regardless of what your research interests are.

I have to say the number of opportunities available is impressive and refreshing, so thank you Google

Don’t be Shy to #fail

Most of the people I know, friends or students, are too scared to fail that they prefer to not even try. They spend their lives trying to avoid failure and thinking that this is “success”. They can go on forever and not know what they are capable of or how unique they are just because of this unfriendly ghost called failure.

We are all familiar with the common sayings:

“The only real failure in life is the failure to try.”

“We seem to gain wisdom more readily through our failures than through our successes ..”

I actually found loads of related quotes that have the same meaning. People are familiar of these quotes and their meanings but it doesn’t help them overcome their fear of failure. Still the ghost wins.

I feel societies empower this ghost with their pressure and stereotypes of some unexpected outcomes or behaviour that are commonly referred to as failure. That is why sometimes you find people afraid to say I don’t know and afraid to seek knowledge from younger people. I know people who consider being the second on the class a failure ???

We must not confuse not reaching an expected result or not achieving a certain goal with the tendency to be lazy or to not do one’s best. The difference is very clear. I have never been harsh with a student for not giving an unexpected outcome. I am the villain only if they chose to ignore their responsibilities and ignore the many opportunities they are given to do their work.

Anyway, why am I bringing this up now? Simply because I have been preaching about the role of failure in learning but I have never had an effective way to help students deal with it. Recently while working on a totally irrelevant subject, I stumbled upon the failure faire. In my opinion, it is a brilliant idea to showcase failures because:

The lessons you can learn from your mistakes will increase through such showcases and discussions.
It is also a strong step towards changing the social attitude towards the word failure. We simply need a different definition, and I feel failure faire is a good practical start.
Another great thing about such events is the possibility of finding a way out to take whatever was thought to be “not working” to “working”. In research communities, we are supposed to have informal talks when we get stuck in our research; this is simply to brain storm together for a solution. So, if we look at the researcher who got stuck as a failure, I seriously doubt that they will seek advice.
So, let us program our brains to perceive the word failed differently…. when you hear it…think this person is stuck, blocked, misunderstood, facing difficulties, learning, etc

Finally, I think FailureFaire should be a common and widely used behaviour especially among educators. That is what I am seriously thinking about, which reminds me why I started writing this post in the first place I would like to start such event with my class and I had several questions on my mind. I would love to get feedback on what could be the answer:

If something is incomplete, can it be listed as a failed attempt or project? If not, can we list it as successful? if not, should we have three categories: success, fail, incomplete??
Also, when to give up on a certain approach and declare it as failed? May be I didn’t do enough attempts to make it work and maybe there is one simple thing that can take it to success but I am still not there yet???
Any suggestions on how to best involve failure showcases in an academic course, should it have different planning than other showcases? Remember we don’t want to shy away from the term, we want to perceive it differently?

All your thoughts are highly appreciated