Dec 192013
 

http://eugeabalos.blogspot.de/The last days have been not very productive when talking about coding, almost nothing done 🙁 but they have been really good when coming to the socializing point. It is funny to see how groups evolve. During 5 weeks we’ve been almost focus in coding, learning, the human interaction was there but somehow limited.

But it has exploded in the last days, maybe because we know more each other or the end is closer, maybe because most of us will leave for Christmas for their country or city, or just because after 6 intense weeks we are also tired, but we have laughed a lot, we have shared all kinds of conversations, I would say going a bit deeper, jokes have been done and complicity now is on the air.

I guess we are a “weird” group, in the good sense 😉 .. let’s say “Dios los cria y ellos se juntan”, which is always a nice experience.

Now somehow there is, at least for me, a “goodbye” feeling, things come to an end to continue in a different way, but before we will have gone back to other reality, not the one that you’ve been sharing for the last weeks. Back to another country, to another mindset, to another way of seeing things, living between two realities and little by little not belonging to any of them or on the contrary to both of them. Last night we had dinner together, at some point the conversation was about the concept of nation, could not follow the whole conversation but on our side, the idea was clear, we don’t want nations, as is something that separates people, but we do support the idea of cultures, not one but many, not uniform but diverse. That’s is part of hacking, thats why we are hacking the world 😀

But before that we have our closing event!! That will happen in some hours, let’s see if it brings us any surprises  🙂

 

 

 

Dec 182013
 

Amazing but trusunrisee, today I saw Berlin’s sunrise, that means that before 8am sun is just coming out…yes, I said sun!!!, that thing that you don’t see much but miss a lot. So though it was pretty early to head to Betahaus for what was going to be a great talk, it was worth to see the sunrise, blue sky, life looks different when the day starts like this.
By 8:30am I was already at Betahaus, nobody had arrived so decided to go and get coffee and something to eat, back right on time to the talk “Marrying front with back end”. It consisted basically in analyzing the structure of code, how to re-use code, how to define components so that your up can be maintainable in a long-term, all having in mind that front-end and back end should not be considered as complete different things.

Then the rest of the day was to try to get the feeling of how ajax, javascript, jquery work with Ruby and Rails, how to pass data between them, so just did a very simple thing, which of course took longer than expected.

I must say that without my own computer (though very thankful that I could borrow one), knowing that in a couple of days hackership is over, kind of feels that is not the right moment to start a new process of learning, which will need some time, still trying to get as much as possible of what is left.

After hackership went for a beer, nice! just a bit of relax and then go directly to a dinner with Spanish friends, time to celebrate Christmas time, to meet, to know how we are, enjoy before going home for the holidays.

 

Dec 162013
 

This is the last week of hackership, it has been an intense time until now  and still is not over!!

During the weekend my computer decided to take a rest again, but now no idea if it will recover, so first thing in the morning was to take it to Batman elektronik.

A really great place to go, even just to take a look 🙂

So is kind of strange to start the last week, setting up the environment. I’ll do a summary of how, since there are steps that I had forgotten. Mainly the process is to install RVM with Ruby and then install Rails.

First you need to install curl, I'm working with Ubuntu, so

apt-get install curl

Then RVM with ruby

curl -sSL https://get.rvm.io | bash -s stable --ruby

 

Then Rails

gem install rails

You want to begin to play around with Rails and you may find that RVM does not respond. To get rvm working you need a login-shell
Then you want to start rails server, for example, and you get an error

Could not find a JavaScript runtime

Ok, in order to run Javascript you need node.js install,

so first you add to your source list the node.js repository

sudo add-apt-repository ppa:chris-lea/node.js

Then you update your packages

sudo apt-get -y update

Then you install node.js

sudo apt-get -y install nodejs

Now, time to start to work, but then you realiye that it was great to have been pushing to github, so you don’t loose the code you’ve been writing but of course not all the code is in the repository, secret_token is not there and the database.yml neither

While remembering where and how it worked the secret_token, how to generate a new one, best practices, it was a good time to improve the “how” so did some reading, a better way to manage  the rails secret-token. So now I have my config/initialiyers/secret_token.rb and my config/secret.yml  which I added to the .gitignore file, so that I don’t commit it in git.

Right now that everything is working time to go to the tetra session, we are going to have an overview of four javascript frameworks, emberjs, angular, backbone and meteor ….cool!! 🙂

After the session had an idea of the differences between them, summarizing a lot I would say that, ember is a MVC(Model-Controller-View) javascript framework, angular can be seen an a way of extending HTML with javascript using MVC, backbone is a skeleton to organize your javascript and jquery in MV*(controllers not included) but without extras and meteor is the unknown future where javascript is in client side and server side, so that data is permanently updated in both sides without any rest api or anything just javascript, not ready to go on production but pretty stable to play around.

mvc2

Dec 152013
 

It was the fifth time but it happened again, I forgot that it was Thursday and time for Betahaus breakfast. But I must say that this time I was happy to be able to have breakfast. Normally I don’t leave home without having breakfast, but today, I was going to be late for the stand up round, so I decided that I preferred to go walking and have breakfast after.

Just riceAs every week, there were startup presentations, this time caught my attention the fact that it was a very simple idea, it was about buying «Just rice», that is their company name, and that is what they do, sell just rice. The idea behind is to get rid of packaging, there is so much plastic even in bio-eco-friendly products, that is really annoying, so this time the idea is to go to the past where people went to the shop with its own bag, pot, bottle to have it refilled, so you just paid for the filling, in this case just rice, but could be any kind of thing. After the Just rice talk I got 1kg of just rice, to try it, the rice comes from Italy, is risotto rice, so I”ll have to try to cook risotto 🙂
Afterwards, talking about this at lunch I came to know  Zero Waste   an initiative to do also what the name means Zero waste, cool!!

Then it was time to go back to the calendar and its always «welcoming» date types, grrr … I spend some time reading about the different date type is Rails, that can be summarize in the fact that Time has become an abstraction of dates and times  , so that they take into consideration Timezones, so I was all messed up because I was storing datetime objects, expecting to retrieve them too, but then realizing that what I got back was  ActiveSupport::TimeWithZone , Rails has decided to implement always times with timezone included, but if you don”t know you just go crazy, but that was until I read ActiveRecord, DateTime, Time, and time zones
I had a problem, I wanted to show the events grouped by day in the calendar, my dates where supposed to be datetime type, i got ActiveSupport::TimeWithZone, so I could not access the the hash key value because it was on the wrong format, and did not know how to convert it from one to the other. Finally after asking, an easy solution, convert both into strings and compare strings is always easier, done and working 🙂

So I had in the events controller

@events_by_date = @events.group_by(&:day)

which returned ActiveSupport::TimeWithZone
Then changed it to

@events_by_date = @events.group_by { |i| i.day.strftime("%Y %m %d") }

and now in the view so that the events could be retrieved I had to

Maybe not having all the code it”s a bit confusing but you can always check this commit on github

After this, I began doing some ajax stuff, I”m a bit lost with it but following the guides and checking railscasts always helps 🙂

DB workshop at SoundcloudBut the day was not over, the end of hackership day meant the beginning of the afternoon, today at hackership J. from SoundCloud came to stay with us at hackership and then offered us to join a workshop he was going to hold about the basics of how databases work. He insisted that maybe too basic for us, but still for me was interesting, I have to «desenpolvar» so many things in my head that is great to revise things but I was not only interested in revising but also in seeing someone teach it, basic things often are the most difficult to teach and I must say he did it great, I learned things and revised other, so cool.

And still the day was not over, Diaspora meetup was taking place in the afternoon, so although it was quite late, I wanted to try to arrive there and see the people, but no luck, too late. In any case tomorrow I”ll be installing our Diaspora pod, let”s see how it goes.

Dec 122013
 

reachers-4Another Grey day. The weather makes you feel slow, heavy and these days my brain is also somehow slow or at least I don’t feel productive at all :-/. Day passes by without much being done. Patience, that something else to learn, to be patience. It was cool to implement the CalendarHelper so that the calendar view now is ready, till the point you have to deal with date types, one of the things that I learned is that Rails decides on its own the date type, so even if you have defined date type as DateTime, when manipulating the date data, Rails will convert it to TimeWithZone, it makes sense to “force” to use Time zones, since they are important, you just get a bit crazy till you know about it.

Today was our Q&A session and it was funny, because at some point there was the comment of “why developing a webcalendar when there is google calendar and it’s so cool”, and I was actually thinking that one of my motivations to start doing a webcalendar was exactly that one,why our only option of using a decent calendar is google, why do I have to give up my privacy, what if I need just a simple calendar for myself, for the collective I work with. No idea if at some point I will be able to develop something decent enough to be called a calendar, of course nothing similar to google calendar, but still my wish would be that there was a good free software calendar.

Cartoon: International coverage of Sudan revoltsThe more interesting part of the day, was the night. If was kind of funny to go to a kartoffelfest, a guy from Israel, had just got German nationality and was celebrating it. Of course getting the German nationality does not mean that you have the same rights as the Germans, but almost and he had also to resign to his previous nationality. So the idea was to celebrate it, with kartoffel, and something I did not know is that Germans are called kartoffel :-D. The curious part of the kartoffel fest was that there were almost no Germans, but most of us were people from some other countries. Which of course is much more interesting, I came to meet a guy from Sudan, he has also done IT, he is a refugee, he is cool and he was telling how absurd had been the war that lead to the division of the country, of course there are a lot of different cultures, religions, languages within Sudan, but there was no problem between people, but Governmental manipulation of things, external “support” lead things to a war, where many people died and are still dying. Lately there had been revolts in Sudan, many people was killed during them, of course the most politically active people and thousands are in jail. The reasons for making a war, gold, oil, and who will make profit of the exploitation of the natural resources, of course not the people.

The good thing about meeting people is that you can keep in touch, so hopefully we’ll meet soon, learning from each other without mediations is the only way the world can change for good.