martes, 17 de diciembre de 2013

Learning online

Almost two weeks since the last post, too much time! But it has not been only my fault (playing for example Rome Total War II), it has been because in my free time I've been learning online.

There are three main sources of knowledge that are taking my free time, two for developing and one for languages. The ones for developing are where I'm spending most of my time because represents what I need to do now and what I want to do in the future. The language source is part of hobby and part of long-term plans for my life, but I think better explain that in order:

First I want to introduce you iTunes U, a really really big repository of knowledge that you can access from your iTunes for free. There you can find lots of different courses about different topics: history, science and, of course, development. My favorite one is the University of Stanford course about developing in iOS 7 (that you can find here). I've tried to learn iOS developing with a couple of books, but only with this course I've been able to understand the basics. In every class there are a slides presentation and at the second half a practical example, everything explained in a comprehensive way easy to understand by a non-english speaker. In addition here you can find the whole collection of podcasts made by Mike Duncan about the history of Rome that as a lover of ancient history I found a perfect mix of entertainmentand culture, give it a try!

The second knowledge source is CodeSchool that is not only a series of videos and slides like iTunesU, but there are 'code labs' to practice every part of the lesson you've done. There are various topics (all related to developing) like Ruby, Rails, CSS, javascript, JQuery... It has gamification so you earn badges and points when you are advancing in the different courses. You REALLY learn here but the sand part is that's not free, but it's only 27$ per month so it's not expensive.

And finally the last one. Since the first time I was in Germany I loved the country and Berlin over all, My wife and I have plans to go to live abroad in the future and as Germany is a good place to go I started to learn german on my own. Needless to say that without a teacher is a hard language to learn but I make it for fun so it's ok for me. One website that I use often to improve my german is Deutsche Welle where you can find lots of exercises and theory to improve your language knowledge.

So, that's all for today, I hope that you find those website as useful as I do.

martes, 3 de diciembre de 2013

Working with versions: Git




What's Git? Wikipedia says: In software development, Git /ɡɪt/ is a distributed revision control and source code management (SCM) system with an emphasis on speed. Git was initially designed and developed by Linus Torvalds for Linux kernel development in 2005. Based on a recent survey of Eclipse IDE users, Git is reported to have 30% adoption as of 2013.

What does that mean? Well, the most basic example of the use of git is a web/app/somethingelse which is developed during days/weeks/months. During that time your code is evolving and changing, adding new features and solving bugs. But sometimes you make a mistake and modify parts of the code that you shouldn't modify and the worst part is that you think that everything is OK. Weeks later you realize that something in your code doesn't work and the origin is a code your erased/rewrote weeks ago. If you are using Git you don't have to worry, only search for the old code and add it to the new one, easy!

The other situation which Git is very useful is when you're working with a team of developers. Everyone is working with his own copy of the code, but when someone has finished some feature of new classes, everyone will be able to download it to his own copy almost seamless, only worrying about the files both has modified.

In the first case we only need a local repository, once initialized Git will track all of the modifications of your code. When you feel that want to make a 'snapshot' of your code, you can commit the changes and add a message. Then using for example SourceTree you will be able to see all your commits and dive through them.

In the second case you'll need a shared repository, the most famous is GithHub. GitHub allows you to have any number of public repositories (everyone can see your code) and if you pay you can have private repositories, which is useful for companies. You can work with your own code as long as your wants before adding the others code to your own, but it's a bad practice because the more you waits the more code you'll have to add which can lead to divergences and bugs.

Last but not least is the ability of Git to work with different branch of code. Typically there are three branches: production, preproduction and development. The first is the application in his most stable form, the one that is in the store or you use to show the development to the client. The second is a stable version in testing mode, in theory there isn't bugs here. And the third is where the new code is tested. In addition every developer has his own branch where he is saving his own code and when he is sure that it's ok he will merge it with development, where at the same time when is tested will be merged to preproduction that will be merged with production.

As you can see, Git is an extremely useful tool that maybe is a little hard to use, but it's worth it!

Some useful links:
- Git homepage.
- SourceTree, a very useful Git client.
- A big tutorial about Git.