Entries Tagged 'Internet' ↓

Django

In my last post, I was talking about how I had made a nice little radio automation app in python. Since then I’ve completely restructured it and it is now split into a frontend and backend, which communicate with XML-RPC (yay for the xmlrpclib module). But the website to go with this project is not that great. The other day I went back to look at the website so far, which I had originally written in PHP. I got annoyed with how disorganised it was and decided to rewrite it in django. Oh. And I just prefer python coding over PHP now :)

I’ve been trying to learn django on and off for ages now. I usually lose concentration after the first two parts of the tutorial. But this time I had a purpose - the website. I’ve found the best way, for me to learn a new language, is to take a tutorial telling me how to make another project, but apply it to my own project. So I installed the SVN version of django and I’ve zoomed through a lot of django learning now. It’s great. It’s all nicely arranged and modular, which is something I’m liking more and more as my programming skills have developed and perhaps lazyness, when re-using code :)

I’ve also been using subversion to keep the code organised. I would have used bazaar if there had been a webdav plugin that worked with the current version I have. I suppose I’ll have to wait for intrepid for that then. subversion is serving me well though. I just got to get the person that’s supposed to be helping me to actually help me. Yes, that’s right - I’m looking at you Stephen.

Vodafone 3G card in Ubuntu

First off, I realise that I haven’t posted a blog entry in a while now. I don’t know why I haven’t, as I’ve had plenty of time, it being the summer holidays and all. I always find my self wanting to do so much stuff in the summer holidays, and somehow turn up doing hardly anything. ‘Tis a shame.

Anyway…

After reading this mailing list post on ubuntu-uk, I was surprised these 3G datacards actually worked under ubuntu. Therefore, I instantly zoomed off to ebay and purchased one for £34 + postage. I made sure it said unlocked in the ebay listing, as I currently have a virgin mobile sim card and didn’t want to waste/switch to vodafone.

So the datacard turned up and I popped my phone SIM in it. Following the guide that was written in the mailing list, I configured it. This was using kppp. So I made everything was in there right and tried to connect. One problem though. Everytime I tried to connect kppp would lock up instantly. “Ah dear”, I though.

After much researching, I managed to set up the datacard using gnome-ppp, which is equally, if not more, easier to set up the datacard in. And here is a little guide I’ll write in full for you…

Continue reading →

Ruby on Rails Fun

Still my early summer holidays. Apart from the many household jobs my parents have instructed me to do, I’ve also be learning a new programming language.

I’ve be learning the great web development language known as ruby on rails. I’m not quite a 1337 h4xx0r at it yet, but hopefully one day! Or perhaps not. I’m not a 1337 h4xx0r at php and javascript and I’ve been using them for quite a while now.

Advantages?

I think this ruby on rails magic makes all this web development lark much easier because of the following things I’ve found so far:

Firstly, the “Model, View, Controller” way of running things. Ok. So this wasn’t easy to understand straight away. But as soon as it goes *click* in your head, it sure is amazing. I remember half heartedly trying to learn ruby on rails a while back and gave up pretty quickly because of the confusion from this MVC. If you want to learn ruby on rails, I do recommend getting a good book (I’ll talk about that in a minute), and also making lots of examples to remember what all the different components of MVC do.

Number 2 in ruby on rails features has to be Migrations for databases. Migrations allow you to easily synchronise database changes between developers of the web application. You make a change to the database that needs to be synchronised? Well then you setup a database migration step and the changes will be updated when the developer next runs db:migrate. Another good use for database migrations would be to easily manage the database states between the development and the actual deployment on a server. I can’t see PHP doing that with any great ease.

Number 3? Well… I don’t have a number 3! I’ve only got to page 100 so far. Actually 99. But still!

The elite book

Before starting to learn I spent much time trying to find the best book to guide me through learning the language. After browsing through the surprisingly small amount of RoR books on amazon, I found that the best beginners book is one that goes by the name of “Agile Web Development with Rails”. It’s a bit of a mouthful for a book title, but it surely is a great book. It is very well written and easy to understand.

The book takes you through building a project that is an e-commerce site. I find this is the best way to learn a new language and is what I’ve done for almost every other programming language I’ve learnt. I would have preferred for it to be a more useful project, such as a blogging system or something else. But looking at it now, I can see that an e-commerce system probably contains lots of different concepts that you will learn.

I’ve included a direct link to the amazon page for the book on the right, so if you are thinking about buying this book, please follow the link below to help support the running of my blog!