I am a Software Developer since 5 years. Currently working for Zeomega. Passionate about web technologies. Open for any sort of freelancing work. Wannabe entrepreneur.
| Hello Guys,
I am prototyping a small website targeting College graduates in INDIA (specifically). Its more about bridging the gap between Students and Industry through open ways. I want to share my idea and get your feedback about it and as well get suggestions regarding some of the problems I am facing. Idea: "Connecting Students and Industry" in "open ways" is what I said right ? By open ways I meant making Student explore the world of academics and opportunities in much more practical and realistic ways, not just through books. To be precise, the site contains features like "Notepad", "Questions & Answers"(Q&A), "Web-Resume". 1)By "Notepad" I meant something to save quickly. It could be used by the Student to save class-room assignment, write a thesis paper, write about a blogpost etc... 2)Q&A is all about asking questions about topics of one's interest and rewarding the community with one's answers. So any Student gets answers directly from an Industry guy, his/her Senior, his/her class-mate etc... It could also be used as a metric to know who serious he is with respect to a particular any field. 3)Web-Resume aggregates all the information the site has about the Student. So Web-Resume will have content like the actual scripts he has written while in college, his writing skills about a topic, topics of interest and expertise in each of them(this is through the questions he raised and answers he has given). How many persons he has helped so far. So I think this is a real way of getting what a Student is genuinely interested in like. So by all means it will beat a typical 2-page word resume which any student prepares in hurry just one day before the interview. So what do you think ? Coming to the problem I am facing is I want to crack the Employee-Engagement puzzle. Meaning, Not just Students, Employees also need to signup. Because Students getting help from the Employees is what the whole game is about. So to crack that, how do we make any typical employee signup and do something which is benificial for him and as well community/students ? If I crack this I can use this as a bait to get Student Signups and the whole cycle continues. So long story short, "how do I make Employees signup and benifit others(while getting benifited). Any ideas ? |
InShort: This blogpost is about, how I started writing my first opensource project "ZeShare" and how I started learning Git(the right way)
Since I am familiar with( and also passionate about) Django, I started writing the application in Django. Its nothing but a small code-sharing app. Similar to pastebin, djangosnippets or like many ones out there. The main point of building this app, is that code-sharing across peers, teams was not possible in our company, except that, there is a common svn code-base which will host our company project's source code. I cant use this, to share "small-small" code snippets with peers. And also, code-reviews were actually performed, only after I checkin(even faulty code) into the svn repo. To address these needs, I felt like building a small code-sharing application, which is "internal to the company". I am from the svn world, but I started watching Github long before the thought of "ZeShare" came to my mind. As everyone puts it, there is some social networking element, mixed into this code-hosting platform, which is what attracted me most. So I decided to put my code on github. As opensource is not just about make your application source open, its also about building the community around it, accepting suggestions/patches from the community and letting the application grow along with the community, I felt like Git+Github should be the path I should take. So I created a repo called zeshare in github and I cloned it from my local laptop and started working on it.As Git makes somethings happen perfectly! (Local commits & branches). For every small thing I started creating a branch and I worked on it. Many a times if I feel like testing two different approaches for a problem/feature(which by itself is on a branch), I branch out. This was never confusing with git log --graph --pretty=oneline. During the course of learning Git and developing the product, I started noting down a few things for my own benefit and for the benefit of any git/github newbie. Here they are: 1) Never directly work on "master" branch2) There will only be one "remote master" branch, which has got the "bleeding edge" code(ofcourse stable and no-errors), as people will be cloning the repo and by default will be at "master" branch. So will not expect errors! 3) There will be remote release branches as release-1.0, release-1.0.1(all bugfixes for 1.0), release-1.1(all fixes for 1.0 + atleast one feature addition)4) There will be corresponding tags for each release as v1.0, v1.0.1, v1.2, .... 5) There can be infinite "local topic branches" which will always be merged into master and to release branches. When merging feature branches to the master, try adding a merge message. No harm!6) I always hate rebase, as it tampers history and can't be done on the branch which is shared with other devs. 7) Always merge the branches, with --no-ff option, as it explicitly shows the existence of the branch in the repo history. This is really a life-saver. And I think it should be enabled by default. Lets hope that, for some day. As an example, see the network graph below, there is a continuous line of commits starting from Feb 1st to Feb 14th, these commits are actually branch merges.(and the merges were fast-forward merges, so git-log doesn't show the existence of the branches. So I started using git merge --no-ff from then. Now development on the branches started to show up in the way it should be shown :D) 8) Just incase if any immediate fix gets done(on a hotfix branch) and gets merged on to master, then all the feature branches get that change, from master, after merging with master(git checkout openid-feature; git merge --no-commit master;) This is the anti of rebasing. Please tell me if we have a better approach for this. Any approach other than rebasing, for pulling changes from other branches into current branch. Update: git cherry-pick must be the right option as it will get only that particular commit. On the contrary, git merge --no-commit master will try to get all the other stuff also(besides the hotfix one)It took me some time to figure out what this is. In the project which I am currently working on, I have a fairly simple models.py
As you can make out, its a normal "Question" model, with corresponding managers. But what struck me was, when I was going through the created objects of Question using Django's admin interface, all the objects with 'visible' flag set to True are only showing up. Meaning only PublicQuestions are only showing, but I defined three managers explicitly(Public, Active, DefaultManager). Even then, I felt django is behaving partially on such manager.I drilled down to the source code to figure out a variable called model._default_manager. Still I went down further and found the answer to what "_default_manager" is and also to the bizarre problem I had.Django sets the default_manager(which is used by Django admin in our case) as the first Manager defined. as you can make out, line:32 in mymodels.py(check the gist on top) is the "default manager". In otherwords its the PublicQuestionManager. So I was only seeing only Public objects. I am not sure why such design decision is made(picking first manager as default manager). And I am not sure why such Default manager is required(if more than one managers are defined).Got an opinion on this. Please comment.Note: Just recently I found a thread in one of the popular forums, asking a similar question. So felt like giving this solution(which I developed long back).
So login as any user into a website ?
Hey dont get me wrong! I am not telling a way to hack into Django's authentication system or steal the password of a user on a Django Site.
If you are an admin of a django site and many times it feels to visualize or experience how a normal website user actually sees different pages of your website. So to get this done, we create a normal user (just for testing purposes) and check the same, which is good. But sometimes we need to actually login as the same person to resolve a issue or to trace a particular exception which only one user or a specific set of users are experiencing.
Enough said. So you need to login as "Anybody" to gain access to their account/pages. Ofcourse you are site admin, and for some non-ambigous, quite-healthy purposes, you need a tool to get that done. Here it is. The django authentication module lets that possible.
Usage:login_using_email(request, "example@example.com")
I have mentioned only the helper or core method which is responsible for the actual user "logging-in" simulation. Proper view permissions(remember I mentioned only admins should use this) can be wrapped around it. Any thoughts on improving it? Always invited....
Quoted by Matt on August 26 2009:
Think about the different areas of your life (career, relationships, spiritual, health, etc.) – and rate your satisfaction in each area from 1 to 10. Go through every area you rated a 5, 6, 7, or 8 – and replace it with a 1! Never settle for “it’s not so bad” – and instead face up to what you really want.
—Derek Sivers summarizing a lesson from the book “Personal Development for Smart People” by Steve Pavlina. Come to think of it, this is a pretty good way to rate feature ideas too. Leave in the essential, omit the rest.
Objective: Ability to post to my update to the facebook wall without the autoposting feature supplied by Posterous
Steps:
First of all I am a big fan of posterous and I really like the autoposting feature. I normall make a tweet using the autoposting feature. It just simply works and is superb. But still what caught my eye was, I need to supply my credentials to them(posterous) to get the autoposting done. Which is reasonable I agree. But still I dont like it. So I wanted to post the same update to my facebook wall(and get friends to see on their own wall of friend updates), without doing anything.
I figured out a way I can do that. May be most of the people who frequently use facebook are familiar with this approach. But I was not. So please bear with me.
Go to Import notes page available at http://www.facebook.com/home.php#/editnotes.php?import and then put your own website url(say nandakishore.posterous.com) and click on "Start Importing". Thats it. Nothing else.
Next time you post a blog(using email or using web) to your own website, you get the same update on your wall. Ofcourse thats the power of RSS syndication. Thankyou RSS.