• Rails Girls Summer of Code 2014

    The Code_Padawans summer full of Code

Code_Padawans go Camp Compressor – Podcast Time

We spend the last weekend in Potsdam, at the most awesome conference ever: eurucamp.

This year Lucas (Nerdkunde), Dirk (Geekstammtisch) and Bodo (bitsofberlin) created a podcast especially for the conference, to collect impressions and speak with people there.

We were guests on the first day and we are allowed to upload our part of the interview here, on our blog. Thank you, Camp Compressor team!

We encourage you to listen to all three episodes of the Camp Compressor podcast. They’re really cool. http://2014.eurucamp.org/podcast/#TCC003

Week 4 Day 4 – Improve everything

Our stand-up meeting today featuring sitting

Our stand-up meeting today featuring sitting

Afer 3 and a half week of walking on the path of enlightment, Magda and I did a sort of retrospective and discussed what we could do better the next weeks.

  • We found out that it would be very helpful for us to have a visual overview of our project like a class diagramm or something like that.
  • We also realised that is very important to document our code with comments and a Read Me. this is important because it halps to understande code you have written weeks or months ago.
  • We also came to the conclusion that it is important for us to work out more structure of our project. For this we decided to have a 2 hour meeting every monday where we can discuss the features we want and how to implement them.
  • The last point is to spend some time of the day focus on programming basics like doing a ruby tutorial or reading a book.

At the end of the day we learned a new term: Going down the Rabbit Hole:

To go down a never ending tunnel with many twists and turns on the internet, never truly arriving at a final destination, yet just finding more tunnels. Clicking one link, then finding another on that page, then clicking another link on that page, which gives you the idea to search for something, and the process repeats.

urbandictionary.com

Ruby is weird, feat. Starring into the void and few practices of the dark side of the Force

„It takes strength to resist the dark side. Only the weak embrace it!
It is more powerful than you know…“
―Obi-Wan Kenobi and Darth Maul [read more]

Void value expression – have you ever get this error? We had, and that’s how we discovered the void in Ruby. It happened yesterday, while we were working on the class creating test methods in our Ataru tool. The existence of void in Ruby surprised few of our coaches & friends.

Dirk and Lucas was very suprised about the dark side of the force

Dirk and Lucas was very suprised about the dark side of the force

We stayed cool this time, not knowing that it was a kind of discovery…

In the first attempt to write the above mentioned class, we used the define_method in the body of another method, which made us to use send method as well, as define_method is private. Send and define_method are useful, but they can also cause problems, if you don’t use them carefully.
Besides of the define_method, we are also using eval in our class. That is also potentially dangerous. Therefore it felt a bit like touching the dark side of the Force.

What is more, it caused our test methods to pass or to fail, depending on which test method was run as the first one. Today we worked hard to fix those issues. Supported by Jedi master coach Kacper we wrote a new method that is even more amazing than the old one. It solves the problem by creating a new class every time the method is called. It also wraps our code samples into a MiniTest test method.

You can check out our repo for the code:

https://github.com/CodePadawans/ataru/blob/code_ex/lib/ataru/code_samples.rb

you can see the results of running tests here:

Testing Ataru with Minitest

Testing Ataru with Minitest

And here’s how it made us feel like:

Even Star Trek guys are getting excited about this.

 

Lucas and Dirk (really awesome guys) are from Cologne and came to Berlin for eurucamp. They both were also guests in the new Asquera office. And yes, we assimilated them into our coaches cloud. :)

We learned a lot of important things from them:
using gifs for pull requests, getting a pink color scheme for the editor and cats instead those arrows for warnings in vim.
Amazing, isn’t it? They have to leave tomorrow, but we’ll see them soon again, at RedFrogConf, where we are giving our first talk!

Week 3 – How to get to the state of serenity

As you might have seen, there are some entries missing in our padawans‘ diary.
It took us quite some time to exercise the secret Jedi super power of the week:

Jedi Super Power of the Week

Jedi Super Power of the Week

During that week we had to manage a lot of tasks. Luckily, exactly that formed the right environment to train ourselves in finding serenity.

To start with, we worked on the first prototype of Ataru. The tool should be able to extract code snippets out of a markdown file and wrap them in test methods.
To implement these features, we had to understand the API of the gem we are using for this: Kramdown.

Soon it became clear, that the next big topic wants to be learned: the recursion.
We need a recursive method to iterate over the document tree.
Kacper gave us a lecture about recursion. We have to admit, that we really need some more time and exercise to understand it fully.

The other session we had with Kacper was about closures.

The weekend from Friday on we travelled to Potsdam for eurucamp – the most awesome Ruby conference ever!
On Friday we had our Rails Girls Berlin Beginners Workshop (as you know, we are both in the Rails Girls Belrin organizers team), on Saturday and Sunday we helped out the eurucamp orga team, supporting them with their tasks.

Eurucamp 2014 – simply a great time; tons of impressions, ideas, thoughts and amazing people. It might take a while till we arrive back to the reality and sort out, how all these experiences have influenced us.

As you can see, we had a lot to, with our Summer of Code project and beside of that with things we had to do for the conference and the workshop.
Having hands full of work with our Summer of Code project and preparations for RailsGirls workshop, attending eurucamp and doing our best to help out during the conference, we could learn how important is to keep calm and be patient with ourselves.
We don’t say it is easy to stay in that serene mood. What’s important is to try, again and again. That’s how you train it.

With this insight, we start the week 4 of our journey.
Wish us luck and a lot of…serenity :)

Week 3 Day 1 Ataru is born

Our gem Ataru is on RubyGems.org

Our gem Ataru is on RubyGems.org

Week 3 of our journey started with a birth.

Since our documentation tool will be a command line tool at first, we had to make a gem out of it.
So we learned today how to build a gem with the help of Bundler. With Bundler (bundle gem your_gemname_here) you get the folder structure and all the needed files for a gem. Nice thing.

The biggest problem we had to solve, was that the name we had in mind (jibe) was already taken. So needed to figure out a new one.

And finally we decided to use….*drumm roll*

Ataru

For those of you who don’t wander the path of the power, here is the explanation:

Form IV: Ataru, also known as the Way of the Hawk-Bat, or The Aggression Form, was the fourth of the seven forms of lightsaber combat. The history of Ataru stretched back through the Old Republic, to at least as early as the Mandalorian Wars, where it was commonly employed by Jedi of that day. Ataru continued to be a common form among the Jedi in the latter stages of the Republic, and was also known to be employed by the Sith.

An aggressive style, Form IV was fast-paced and effective against single opponents, though weaker in prolonged combat and confined spaces. Also, it was not recommended for use against opponents wielding blasters. Ataru was characterized by Force-assisted acrobatics, such as somersaults and leaping strikes, both for attack and defense. Another characteristic of the form was its fast, powerful strikes from multiple directions. Notable users of this combat form during the Old Republic included Yoda and Qui-Gon Jinn. The New Jedi Order preserved knowledge of Ataru and Jedi Masters such as Luke Skywalker, Mara Jade Skywalker, and Kyle Katarn all employed it.

Read more here: http://bit.ly/1nNmQJi

After finding the name we created a code_padawans account on rubygems.org and pushed there our gem. It’s almost nothing in there, but we’ve saved the name :)

Besides of that exciting part of creating a gem we did the following things today:

  • Creating a gem and pusing it to rubygems.org
  • Planning the next Sprint, deciding what features our next version will have (read a markdown file, extract code samples out of the markdown, wrap them into a test method and run it)



We finished the day with a google hangout with two others Rails Girls Summer of Code Teams: Team Participate from Helsinki and Karolina and Magda from Team Species+. It’s cool to talk to other students and see how they work.

Week 2 Day 5 – Secret Jedi Super Power of the Week – Synergy

Secret Jedi Power of the week

Secret Jedi Power of the week

Synergy is the interaction of multiple elements in a system to produce an effect different from or greater than the sum of their individual effects. The term synergy comes from the Greek word synergia συνέργεια from synergos, συνεργός, meaning „working together“. (Wikipedia)

Yes, there it is, the second secret Jedi super power, that Code_Padawans gained and are to execute and benefit from all through the Summer, and beyond.

We acquired this super power by doing pair programming sessions; we found out, that when we work together and discuss our ideas, we are much more effectiv than while working on our own.

Besides that very meaningful attainment, we did some research and readings on TDD. The resources:
„Test Driven Development By Example“ 
„Growing Object-Oriented Software Guided by Tests“ (both by Kent Beck)
and „BDD mit Hanoi“ tutorial (in German, but with pictures;)
We enjoyed going through „How do I test my code with Minitest?“ tutorial by Steve Klabnik (who is a really awesome guy btw [Ute knows]).

We also did a review in the morning, talked about the week that lies behind us: what we liked, what we can do better next week, what tasks we have in front of us. We both came to the conclusion, that this week was good for us. Writing code is fun (and challenging) and you can see, that with exercise the use of tools like vim and git becomes easier and easier.

Soooo, week 2 is over. Time is running so fast!

Week 2 Day 4 – Improve your code by eating strawberries

Strawberries improve Code_Padawans powers

Today we worked on our test framework nano_padawans_test.
We implemented a method that finds all subclasses of the Test superclass and saves them in an array. That’s the base for the method that runs all tests: it creates an instance of each test class, finds all the methods that are test methods (you have to name them like „_test“ in the end) and runs them.

After that we cleaned up a bit:

  • Created a separate file for each class
  • Renamed the classes to point out their functionality
  • Pushed that files into github

Week 2 Day 3 Nano Test by Padawans

Let’s walk on the path of enlightment in becoming a test driven Code_Padawan!
And what could be better to learn something about tests than writing our own small test framework?

The Test superclass has this functionality:

  • find all methods that end on  „_test“ and run them
  • find all classes that inherit from Test
  • make assertions and get the result of the method

It’s super helpful, as you don’t want to run every single test method one after another. Test finds all of tests for you (or those that you want to be found) and runs them all at once.

Yes, this sounds like nothing big, but we have learned a lot out of it:

  • What it means, that all classes in Ruby are an object
  • That there is something called „self“, that gives you access to the current object
  • You can search for method names and save them into an array, and run them then by using „send“

We had to read a lot to find out how we can implement this. It was a good exercise to read through Ruby-Doc, use Stack Overflow and find some helpful tutorials about MiniTest for example.

We had to deal with the fact, that our first ideas didn’t work as expected…

Magda is working hard

Magda is working hard

But at the end of the day we wrote something, that worked. It’s still not finished, we have to do some refactoring, buuuuut it’s a piece of working code. Written by ourselves…

Firt sight of nano_padawans_test

Firt sight of nano_padawans_test

nano_padawans_test is born. You can take a look at our repo, if you like: nano_padawans_test

Week 2 Day 1 – Issues with branches

issues with branches

issues with branches

Magda says: it was great working today. But my brain got full, no more comments, check out the picture 😉

Week 2 Day 2 – So this is a real world project

How our website looks like at the moment

How our website looks like at the moment

It’s the time to get used to working with github, github issues, branches and pull requests. We create now issues for features we want to implement, create a branch for each implementation and make a pull request once we are ready with it.
At first this workflow needs some exercise, but after making a few pull requests one gets used to it and, what’s most important, it makes work more transparent and organized.

Today we closed two issues:

  • Remove the .html file extension from the links in the sidebar menue.
  • Make some adjustments with text aligment and floating

As you can see, our simple website looks different now.

For the first issue, it was neccesary to understand how the class pathname works. you can remove the file extension by giving „.*“ to the method „basename“ as a parameter.

The second issue was fixed with the help of some CSS research (google).

In the afternoon we talked to Dario from the Padrino Core-Team about some technical details of the website and – as it happens to the real world projects all the time – we decided, for the time being, to postpone the project 1. (bulding a documentation website) and move to our second and bigger project – creating a documentation testing tool.

We also recorded our first podcast episode.

You can find us on SoundCloud.
Since this is our first podcast we’ve ever done, there are some things that could have went better. We will improve it next time around. As for now, we hope you still enjoy listening.