Pages

Saturday 19 July 2014

Packages for django


I think I should try a django package to mark my foray into using apps others have already invested in. I still remember doing a javascript tutorial ages ago on Codeacademy and getting introduced to jquery. It blew away my mind.

I still don't have any experience with packages. The thing that is holding me back right now is the assumption that the packages will come with dependencies. I want to move ahead with django and avoid overhead for the sake of speed of my learning. For example, I'm currently finishing up class based views which take precedence and need to be completed quickly.

Registration Packages

Still I thought I should give packages a try. Starting with registration and authentication seems like a good idea so I searched for that. Following are the useful links I found:

1. Django Packages: An exhaustive list of packages for an overview of the available packages.
2. A linkedin question: A lot of suggestions and links to follow regarding registration apps.
3. A blog post with hands on comparison: A bit old (May 2011). I'm still new and things with screenshots do help my comfort level.

So I had narrowed the list to Social Auth, Django Allauth, Django-Registration, Django Userarena and Django SocialRegistration.

It seems like Django Registration would be a good place to start. Although it has been abandoned an year ago, it is described to have a good design and that should help me with the learning curve. After that I might give django-allauth a shot as it includes social login as well.


Thursday 17 July 2014

Learning Git basics


I spent some time on the basics of Git today with Pro Git till chapter 3 (excluding Rebase). I feel like I am good to go.

Also, a few days ago, I had spent some time with git on try.github.io and a short random Youtube tutorial. I wanted to start with Pro Git even then but I was a bit tired and thought of doing walkthroughs to get accustomed to the Git environment instead. 

But the book is the best resource I have found till now and the workflow is pretty good too which makes it good even for beginners like me. 

Even then, I don't think I'll be studying the next chapters for some time now except for troubleshooting. This is because my purpose for leaning git for now was to have my projects in remote servers for better access, do a bit of branching for experimentation and, of course, as a hedge against disaster. (Like the time when while testing a new mapping in vim, I deleted most of my settings.py file in the djano app and realized it quite late.) In hindsight, it would also be cool to have a commit streak longer than 1 day on github.

Also I made an account on Bitbucket today, in addition to the one on Github, after realizing that it allows free private repositories. Maybe I could use it to hide some embarrassing noob projects. (Not that they aren't already there on Github.)


Wednesday 16 July 2014

Bootstrap


I stumbled upon Bootstrap (or twitter Bootstrap) through the tangowithdjango book. A framework for front end! Cool. From comments on blogs, there do seem to be some shortcomings. Which have turnarounds. Which in turn have some more shortcomings (which is the case with every framework I now understand).

But for my purposes of simple test apps, this should be just fine. Should look up the tutorial in the next few weeks.


Tuesday 15 July 2014

Blogging


The way I am writing blog, using blogger, on web client, the actual blog home page, seems to be very cumbersome and inefficient. There have to be far superior setups.

But I need to focus and can't spend a lot of time on configuring the blog. As I do this more often, the pain is lessening considerably. But I think I will shift into a world someday where blogging would be much more enjoyable.


Data Structures in Python


I have been learning on a strictly learn as per requirement basis. Hence I have only the basic knowledge of python.

While working on django, I now feel the need to learn about data structures as now the nuances of lists, dictionaries, tuples etc. are coming into play and I'd like to become more comfortable with them. So here it goes into my priority list.

P.S. I've always wanted to learn more of data structures and algorithms. One has come into play, I hope the other will follow soon (if ever!).


Friday 11 July 2014

Template Inheritance


While working on the official Django tutorial, I had skipped template inheritance as I wanted to quickly make a minimally functional project, no matter how bloated. Also I had mapped some keys in vim to give me the boilerplate html, so it didn't bother me much.

This time around with rango, I did complete it. I think I should be comfortable with it now. And of course it does do a lot more than what I was doing with vim.


Opening a new file in Vim


I remember observing a few days ago that all the commands in my terminal were about opening various files of the project in vim. So I spent some time on finding a command which would, in vim itself, save the current file and open a new file.

I found out that you can give commands to shell using :! command, for example :! python manage.py syncdb. That seemed to be pretty cool.

But then I discovered a godsend, :tabe {file}. (Short for :tabedit, I also learnt that vim takes up the least possible characters which can be used to uniquely identify a command. Neat.) It opens up the file in new tab for editing. I didn't even know tabs existed in vim! And as I was working on django, being able to have multiple files open in the same window surely boosted efficiency by a few notches. There are always a few tabs open for me now and I dread remembering the closing and opening of files that I needed to do.

But today I again felt a need of a command to save the current file and open a new one. I remember not getting anything the last time I searched for it. I hope I get some time in the next few days to find it. Or better still, hopefully, I'll stumble upon it.


Auto-completion in VIM


I got to know about Ctrl-N in Vim a few days ago which autocompletes the words already in the file. But I still feel that I may be able to save a lot more on typing if I spend some time looking for new commands and ways to improve my vimrc.


Thursday 10 July 2014

Namespaces in Django


I still haven't come across the situation where not using namespaces will cause problems. (At least it isn't apparent to me yet.) But the emphasis given to surely reflects its importance. Hopefully I'll stumble upon some good example of its use. (And my brain will be receptive at the same time.)


Git reminder


I need to work with forms on django and I'd like to branch out my project for some experimentation on the side. 

I need to prioritise learning git! I believe that the second chapter of Pro Git would suffice for basics. Have to carve some time out for that.