Tuesday, August 21, 2012

Learning new skills


I got my first computer when I was 12, that was a mind whopping 26 years ago. This was a love at first sight, although I wanted a completely different computer than my parents would allow. I got an Apple //c computer, with practically no games available as these computers were mostly used in academia and business. I did get a few games though, but this wasn't a Commodore 64.

I am glad now that I got an Apple instead of Commodore 64. For one, I could easily write both uppercase and lowercase letters at the same time, I had 80x25 lines of text. I could very easily write all my school projects in Apple Works and Apple Writer and print them out. I had Print Shop by Brøderbund software, so I could do banners. I had a printer even. But first and foremost, I got a world class Basic programming language, for free, completely free. It was just there. Boot from any floppy and you had Basic. You had to list files on that disk, you had to do that in Basic. I never knew this was Microsoft basic until much later. But since you don't have many games, you play with the computer in order to play with the computer, that is become a computer a nerd.

I got pretty good by myself, and taught myself to program, when I was 12, completely by myself.

Ever since that time, I keep up. I am constantly learning new things and getting better. Even as I am closing in the dreaded four o (40), I still am learning new things all the time.

Best way in my mind to learn something new is to make something. Now, I don't have many ideas, but there is usually always something, something you yourself need. A few years back, I searched for a way to merge a few pdf documents. The government in Iceland gives out a paper, both old fashioned and in pdf with all legal things. Companies foreclosures, bankruptcies, legal agreements and such boring stuff, boring for most, but it can be fun reading this. Problem, the documents are quite small, and come out quite frequently, sometimes 2-3 times a week. But when you want to search these documents you could not (this was before Spotlight and Windows Search got good). So to merge all these documents was a pain.

So when I decided to learn Play framework and learn Javascript, I thought, why not make this into a web service, free with ads on the page. So I made mergepdfs.com, with asynchronous uploads, which means, just drop a file into the page, and it gets uploaded given it has the correct meta tags. Then just click on 1 button and it would download the results automatically. Sounds simple, well not that much. But I did make it, and with a Jquery plugin for file uploads, I did make it. I am quite proud of this site.

This is a totally free service, meaning you make your merged document for $0. There are no up sells, no limitations. I am happy with it, and will be releasing a new version real soon, with some more Jquery stuff. Technologies used, Backbone.js, Underscore.js, Jquery, blueimp file upload,Play Framework and everything runs on a powerful Intel i5 Linux box.

I just can't explain it but single page web apps, are super cool.


Links :


and finally the website itself :


Eating crows

When you have to take back things you have said, things you thought and change your way of thinking completely, it is sometimes called eating Crows, like the bird, which no one eats, and no one would eat, guess it is called that since doing so would be considered very hard.

I have been working hard on studying Javascript. For some time and since I come from mostly C based languages like C, Objective C, Perl, PHP and so forth with Ruby added on top, it has been harder than I thought. Using anonymous functions, or functions without names does take some time getting used to. But this is all going well now, and I keep getting better.

Just for fun, I decided to have a look at Java again. Perhaps it is wrong to say again since I have not looked at Java since ca 1997-8 or something like that, and I never used it even then. It failed so miserably in creating desktop applications that I did not use it.

I have been meaning to use it much more, but there have always been much better solutions. First it was PHP, then Cake PHP which lead me to use Ruby on Rails, which I am a huge fan of. I though it would take me a long time to learn Ruby, but it only took a few hours until I was getting there and less than 2 days later I had re-made my family website in Ruby on Rails, from Cake PHP.

Now when I changed jobs last time, I found that they use something called Play framework for everything they did. My boss at the time loved it so much that I felt I just had to have a look. But back in my head I just thought about the "other" java web frameworks, even other Java rails clones with their awful xml config files for everything. Not my cup of tea, thank you very much. But my boss was such a huge fan that I gave him the benefit and installed it.

The installation was so simple. The Eclipse installation was a horror, install this, add that, update this, but I got that over. But every time I clicked on a css file, or something that wasn't Java, Eclipse opened up an external application to view that file. I did not like that, and it was just silly. It should work the other way around, if I really want to edit a file in Coda, I should ask Eclipse to do that. But I did remember that SUN, my former employer had bought or made an editor called Netbeans. So I gave it a try. It was not love at first sight. I thought it didn't redraw itself correctly, but it worked, and gave me great code complete in Java, which I needed. Then once I checked in my code in Git I figured out what the redraw issue was, it was showing me unchecked code. And after working for a few hours in Netbeans I liked it a lot.

But as for Play Framework, I was just blown away. No one complains about Java speed in a server level, but this was just mind blowing. Play framework was so fast and used very little resources. I had to swallow quite a lot in the first day. Then for the next few days I learnt a lot more. Now I am writing all my web code using Play framework, never looking back. I no longer hate Java, it is very good. Now I have a few websites up and running, mostly just to learn. I will write more about them in other posts.

Links :

http://www.playframework.org
http://jquery.com
http://cakephp.org
http://rubyonrails.org