Tuesday, December 21, 2010

The rest of FOSS.IN (and some of noname.conf)

Last you heard me talk about day 1 at FOSS.IN, while day 2 was in progress.

Now I will talk about Day 2 and Day 3 and noname, way after they all got over.

Morning I was feeling fit and I found myself at FOSS.IN just in time to catch href="http://0pointer.de/blog">Lennart talking on Open Surround Sound and href="http://www.pulseaudio.org/">PulseAudio. After that we went Upstairs (that's the phrase I will use for each time I had no interesting talks to attend and I would sit with the others, laptops open and chat[i.e. not over network]). Oh wait, no, we set up the Fedora Booth, and were clicking pictures there, of the booth, and media, and buttons and the White Fedora Table Cloth and us. Two things which I noticed at the Fedora Booth:
1. Media was more popular than the buttons.
2. x86_64 media was in high demand, and we did not have any (maybe next time [not next FOSS.IN though{as maybe they wont have it next year}]).

Post lunch I went over to Hall 3 where the Fedora MiniConf was running.

While I was blogging about the previous day, Amit Shah talked about Virtualisation in Fedora, Aditya Patwari talked about Fedora Summer Coding and his experiences of it, Arun SAG talked about Emacs, its plugins and how to get them packaged, then he announced that he was doing the packaging workshop upstairs and he took most of my audience away with him(despite my protests), I talked about Four Seasons of Code(that went fast as there were very few people and I did not want to linger as they showed no interest), Neependra talked about using ftrace and Suchakra talked about using embedded linux via a web-browser(he mentioned he was a Soft Hacker). There was half an hour left so Rahul started with his famous Fedora Packaging from Scratch workout. All was well.

After that I went Upstairs. I guess.

No, I was in James Morris' talk on Linux Kernel Security. Later in the evening Fahrenheit (with guitarist being Gaurav Vaz's brother) performed, some covers and some own songs. I enjoyed the show.

After the show me, Saleem, Sheela and the group of foreigners ended up at a lounge called Don'tRememberWhat. Had fun talking to Olivier Crete of Collabra. The best part was when he asked me why weren't they playing Bollywood music and that he likes the song and dance sequences, and I told him those don't happen in real life. Suddenly the DJ started playing Bollywood music and then the family at the other table got up and started dancing. Sheela joined in, and so did the rest of us. Lennart preferred to remain seated though.

~ * ~


Next day, Day 3 I was early to catch Dimitris talking about scaling web apps. It was informative, I took a few notes (just a few?). For the next hour I was Upstairs though I managed to peek into Mahendra talking about CouchDB apps.

Post lunch I was generally lost, maybe Upstairs. I realised something must be happening in the Wikipedia miniconf, so I dropped in. Erik was talking about intresting wikipedia stuff, I was feeling drowsy, so I went to get a cup of coffee. By the time I returned, he was over with the talk. I went back to being lost, Upstairs. I was waiting for Aanjhan's keynote.

His keynote was titled "A Hackaer's Apology". It was an interesting collection of stories and stuff from Aanjhan's stint with FOSS. Atul Chitnis took the stage next. He talked for a long time and (among other things) thanked all the people associated with FOSS.IN over the years.

The Raghu Dixit Project came next with an awesome and mind-blowing performance. Having heard them for the first time last year FOSS.IN, I had listened to their songs over the year. I enjoyed the show a lot.

Me, Saleem, Rahul and Ram had dinner at Subway. We spend the entire night discussing about FOSS, Life, God, Human Beings and among other things, concluded that I was an anarchist. :-O

~ * ~


Next day I was at noname.conf at Jaaga. The place is a bit strange looking with plants growing on watery rotate-able walls, a metal structure with hardware hanging in a bunch in the middle. I met Roshan and Vignesh there. It was pleasant to see them. Saleem was also there. For the time I stayed at noname.conf, it seemed like a Barcamp of sorts with mainly startup crowd. I left with Roshan and Vignesh, had coffee at Cafe Coffee Day and visited UB City, with all it's grandeur. There I had the idea of XKCD on your wallpaper and dicussed it with Roshan and Vignesh. It works now.

Night till the next afternoon I stayed at Souvik's place, and met up with Gaurav, Rangeen and Saikat. By Sunday mid-night I was home.

Monday, December 20, 2010

XKCD on your GNOME background

Hi,

I wrote this little script which would download the latest XKCD comic and put it centred onto your GNOME Wallpaper.

It screenscraps the latest XKCD homepage and looks for the image URL, it then downloads it to /tmp and uses gconftool-2 to set it as your background.

Try it out and lemme know if you like it.

I have put a cron like
0 15 * * mon,wed,fri /path/to/xkcd.py
That will update my wallpaper at 3 p.m every Monday, Wednesday and Friday.

#TODO:
* Would like to make it Desktop independent.
* Would like to have the mouseover text below the comic.

#UPDATE:
Thanks to andy(see comments) this script uses JSON to get the data, and avoid screenscraping.

Thursday, December 16, 2010

Day 1 at FOSS.IN/2010 (and maybe some of Day 2)

(Yes, I am blogging after a long time.)

And I am blogging about FOSS.IN, Day - 1, while I am almost halfway though Day 2. Well that I because I am now sitting through Aditya Patwari's talk on Fedora Student's Contributing a.k.a Fedora Summer Coding, and waiting for my talk which would start soon. Yes, I am nervous, as I always am before my talks, and I wanted to do something to take the pressure off. ;-)

(Aditya is a surprisingly good speaker.)

Coming back to yesterday, I was sick. I took some medicines in the morning which kept me going through the day and I did enjoy a lot yesterday. I went in and met old friends from last FOSS.IN, and Ramkumar with his huge desktop-like-laptop with the heavy-expensive-doubleUSB-nonprinted-keyboard. With a cup of coffee we went to attend the talks.

(I see people leaving.)

Kishore Bhargava kicked-off with the opening ceremony (read lighting of diyas). Danese Cooper had her keynote on Wikipedia technologies. She started off with "Wikipedia != WikiLeaks". The talk was a good insight into the tools and practices that wikipedia uses to manage its backend. I took a few notes, for later reading.

(Arun SAG is telling the audience how to package emacs plugins. Arun is an engaging speaker.)

I had lunch. The queue was long, for the lunch and outside the men's. I had less food because I wasn't well. After lunch I went into Balbir Singh's talk on Operating System Caches in a Virtualised Environment. I wasn't very interested in the talk, I was waiting for Lennart's talk on systemd, hear from the horse's mouth. The talk was good (and the confetti dropping from the ceiling), I could understand most of what he was saying, and I even managed to ask a question. ;-)

(The hall always starts getting empty before I am to talk.)

I didn't want to know about hacking LibreOffice. So I spend the hour chatting. Next I went into Philip Tellis's talk on Boomerang, which was a client side JavaScript code that measured latency on the client side and send it back to a central server. The software looked good, but fishy.

(Arun is still going strong with the specfile for emacs-identica plugin)


Rahul
had his keynote next about the Failures of Fedora, and I was looking forward to that. It was informative, interesting at parts. After the talk they were starting off with a video interview of Julian Assange of WikiLeaks. We the Fedora Public decided to skip that and do a dinner party of our own.

(My talk of Four Seasons of Code is next, and I'm nervous)

The dinner party went good. Food was nice with all the beer (I did not drink) and the drunk brawls about git behaviour with pipes. Back at the hotel it was another war to get the wireless running with one faulty router.

(That's all, Arun is done with his talk, I'll go up now. Bye!)
(My talk's over, I'll just add a few links now and submit this.)

Monday, August 2, 2010

FSoC Weekend Hack Sessions

This weekend me and Gaurav sat together and had a look at how FSoC had been shaping up and where it was headed.

Lots of issues were tackled over two days. Listing some of those down here:

Saturday:

• Revised method of setting values and admin credentials in app_settings.yml
• Revamped Admin Dashboard.
• Image upload issue for Certificate.
• FAS registration Module as a Plugin.
• Customisable approach to development.
• Comments and Journal sharing the same Model.
• Calender displaying task deadlines.

Sunday:

• Edit settings.yml from Admin Dashboard.
• More work on the Admin Dashboard.
• Program name Abbr. year. in settings.
• FutureFeature: Project description markup.
• Task date checking for Summer Coding mode.
data_file should go.
• Summer Coding dates to be moved to a settings file.
• URL validation.
• Tabbed/Ajaxified Dashboard, Projects, Users view.
• Failing tests.
• Access Controls go to Models.

These are only the points I got to note down, other than this there were more minor issues handled. Next weekend we plan to sit again and hack. :-)

Thursday, June 17, 2010

yum install sup

I am happy to announce that sup has now been pushed to the Fedora updates-testing repository.

Now you can do
yum install sup --enablerepo=updates-testing


It took packaging three rubygem dependencies
* rubygem-net-ssh
* rubygem-rmail
* rubygem-lockfile

The package is rubygem-sup. Apparently all rubygems have to be named this way, regardless of whether it is an application or library.

Use it, test it and provide karma to the package, so I can push it to stable. :-)

Thursday, June 10, 2010

rpmcat

One of the ideas that came out of packaging rubygem dependencies for sup and sup itself, was a need of a script that would cat a specific file from an rpm. Since rpmls exists, the next logical step would be a rpmcat.

Rahul told me to go ahead and write it down. He also gave me a few pointers.

Here it is.
Copy it to your /usr/bin/ and do a chmod +x

Usage:
$ rpmcat <RPM> <full-file-path>
(get the full-file-path from rpmls)

Don't try random stuff. It will break! :-P

Wednesday, June 2, 2010

FAD Pune, haml and sup

I was supposed to be working on and talking about Dorrie. But that meant I had to sync the F13 repository, which I was not prepared with.

So I started checking out haml and converted one of my FSoC templates to haml. That was fun. Takes some time to get the hang of, but it makes your templates really clean and beautiful. Here's a before/after.

Rahul then asked me why I was not packaging sup. I said that was because I had never packaged anything for Fedora before. He said now would be a good time to start.

So we started packaging sup. We made a rpm spec from the gem spec of sup. I found out that a lot of sup's dependencies were not packaged for Fedora. So I started with them first.

For the rest of Day1 and entire Day2 I spent making spec files and doing review requests.

I have two packages under review now. Another is on the way.

Hoping to get sup packaged for Fedora soon.
Yours,
Shreyank.

Monday, May 17, 2010

Sync RailsCasts

Since Kushal has a local copy of Meet the Gimp, I decided to sync Railscasts locally.

I wrote a script. It's available on my github.

Do sent in comments.

Posted from GScribble.

Thursday, April 29, 2010

Four Seasons of Code

It started after a discussion with Sankarshan, Rahul and Kushal. We needed a system (a web application) to manage student projects. Google Summer of Code was using this framework called Melange. So I was thinking in the lines of developing a similar application using Ruby on Rails, which could be used by Fedora Summer Coding program or similar programs like the DGPLUG Summer Training.

I thought it up as in idea for this year's Fedora Summer Coding. But then I thought maybe I could start up on the project and develop some existing funtionality, so that the student coding on it would have an idea of what's in the books and get something to start on. Maybe add some new features or something.

I have been developing it for the past three weeks. I have some code which I have hosted on GitHub.

Here us a list of the features the web application currently has:

User Management:

* Authentication of three different types of users:

0. Guest user (unauthenticated user)

1. Admin

2. Mentors

3. Students

* Project listing and About page available to unauthenticated user.

* User listing.

* User profile with information about project activities.

Projects Ideas

* Mentors and Students able to add project ideas.

* Mentors can volunteer to mentor a project of their choice.

* Project proposers and mentors can edit project ideas.

* Project proposers can delete project ideas without any mentor.

* Admin can add/edit/delete all projects.

Proposals from students

* Students able to submit proposals for all projects.

* Students able to edit proposals.

Dashboard

* A user dashboard having current logged-in users project activities.

A lot more work needs to be done. I will soon create a task list for Fedora Summer Coding.

If you are a students who wants to work on FSoC as a part of Fedora Summer Coding follow guidelines mentioned in the wiki.

FSoC is liscenced under GNU AFFERO GENERAL PUBLIC LICENSE version 3.


Posted from GScribble.

Tuesday, April 20, 2010

Defining various roles via ActiveRecord Associations using Ruby on Rails

I have a User model. and I have a Project model.

Now a User could be associated with a Project in three ways,
* It could propose as project
* It could mentor a project
* It could be a student working on a project

I had added three foreign keys in my Project model,

t.integer "proposer_id"
t.integer "mentor_id"
t.integer "student_id"


Now how do I associate the three foreign keys with the User object?

Solution:

Add the following associations to your Project model:


belongs_to :proposer, :class_name => "User", :foreign_key => "proposer_id"
belongs_to :mentor, :class_name => "User", :foreign_key => "mentor_id"
belongs_to :student, :class_name => "User", :foreign_key => "student_id"


Now you can access your user from the Project instance like this:


@proposer = project.proposer
@mentor = project.mentor
@student = project.student


where project is an instance of Project model and proposer, mentor, student would be instances of the User model.




Foreign keys changed to match Rails conventions as proposed by Shakthi Kannan

Updates:

To access the assiciations from the User model, use the following associations:


has_many :project_proposals, :class_name => "Project", :foreign_key => 'proposer_id'
has_many :project_mentorships, :class_name => "Project", :foreign_key => 'mentor_id'
has_many :project_internships, :class_name => "Project", :foreign_key => 'student_id'


From your user model you can access the associations from your User instance like this:


@project_proposals = user.project_proposals
@project_mentorships = user.project_mentorships
@project_internships = user.project_internships



Posted from GScribble.

Monday, April 19, 2010

gscribble + blogger

Hi,

Its been long I had been expecting Blogger support for Roshan Singh's gscribble.

This weekend Roshan sent me an RPM, and told me to test it. So that is what I am doing right now.

It fetches all my recent posts, and gives me an option to edit it. Although I do not get to see pictures in the 'Visual' mode.

Also it would have been great if I was able to write/edit my posts directly from the 'Visual' tab.

I see the gscribble logo I had made for Roshan on the notification area. Clicking it hides the gscribble window. Clicking it again, revives the window, but the tab switches to 'Visual' and the 'Categories' pane has to be resized again.


Now I'm going to publish this blog, but I see two buttons below: 'Post' and 'Publish'. Which one to click?

Posted from GScribble.

Friday, March 26, 2010

HTML attachments in sup

For all those who don't know I've been using sup to read my office mails.

Sup has a terminal based UI, and like all other terminal based UIs it hates HTML attachments. Even I hate HTML attachments. But some people don't, and they continue to send mails in HTML.

Keying 'enter' on the attachment tells,

'Couldn't execute view command, viewing as text.'



It shows the entire HTML code and, that's ok if you know how to read HTML, but who wants to read html?

So enter pipe.

I press pipe '|' key which invokes the shell pipe on the attachment. Then I type in 'elinks' and press enter.

Voila.



P.S. : On Fedora, yum install elinks. Elinks is a terminal based web browser. :-)

Monday, March 22, 2010

RubyConf Day 2

Sunday, March 22nd
Bangalore

I reached some 15 minutes late. Nick Sieger was already taking on "Exploring Rails 3 through choices". He was taking about/demoing some cool features coming up in Rails 3. I like the lazy querysets part, which was missing in Rails and was already available in Django.

Pradeep Elankumaran, a US based entrepreneur, then took the stage and talked about the huge trend of startups in India. The session was very interactive with Pradeep talking on "The Startup Mindset" and the people in the audience chipping in with their views/experiences on the startup trend. I was listening intently and reflecting why I am not ready to do a startup at this stage of my career. The discussion ate into the lunchtime.

Pradeep also mentioned and thanked Satish Talim and his efforts in spreading Ruby as a language in India.

Lunch was good.

Post lunch I sat through Sarah Taraporewalla's session "Taming of the View". She talked on how/why Rails erb templating sucks and mentioned other ways of developing good Views including a tool she developed called Slippers.

Vineet Tyagi talked next on how he build his Web Application Server, WebROaR. It was cool how he compared building an appserver to building a house and went ground up. He was very good at explaining stuff, it was like slitting in a classroom.

I then took a coffee break. I later realised I missed an awesome talk by Brian Guthrie on Advanced Ruby Idioms. The next talk "Hacking and learning from Open source Ruby (Open source Rubyisms)" by Sreekanth Vadagiri went totally over my head.

The last show at RubyConf India, 2010 was ThoughtWorks Founder/Chairman Roy Singham. I looked up Ry on the internet and found that he does not have a significant online presence, quite a surprising thing for the leader of a Company like ThoughtWorks. He talked about agile and other recent trends in the software industry and how they have been producing good results. There was a minor flame war between Roy and Obie when he mentioned the split between the Ruby and Rails community. He mentioned that the 28 women at RubyConf India was the maximum attendance for women at ant Ruby/Rails conference in the world. He wanted us to use our enthusiasm and help the not so fortunate people in India.

It was 6pm and I had to run to the BLR Airport for my flight at 8:30pm. What happened there is another story.

That's all.

Sunday, March 21, 2010

RubyConf India, Day 1

Saturday, March 21st
Bangalore

Arrived yesterday(Friday). Staying with my friends at BTM Layout. Its a bit far from the RubyConf venue.

Reached a bit late to the conference, (due to some venue location problems). I got my speaker/delegate kit. Ola Bini had already started with his talk on "The Future of Programming languages". He was talking of various programming languages and different programming paradigms, with special reference to Ruby.

Obie Fernandez came next with his talk titled - "Blood, Sweat and Rails 2010". His talk was pretty fun. From what I gather he worked with ThoughtWorks and now has his own company called HashRocket(both RubyConf India sponsors). His talk was filled with anecdotes from his work experience and their work culture. He also talked about Rails best practices. He used a lot of 'expletives' and was reprimanded for that.

After lunch(which was very tasty), I could be found sitting at the Sessions Hall(Track 1) looking through my slides and writing notes. There were a lot of people attending at the room, so I was a bit nervous. Ivan Porto Carrero could not make it to India so they set up a Skype video call for his talk - "IronRuby: The Ruby &.NET Love Child". There was a lot of technical glitches and the talk finished fast. I was next.

Because of all the confusion in the previous talk, the attendance had rarefied. I was feeling a bit more confident as a result(don't ask me why). I did not screw up much during my talk(except for the RoR requires a steep learning curve part, which the audience did not approve of; followed by a heated discussion). I had made my slides using Latex+Beamer(was an interesting experiment, came out good). I have shared them here.

I rushed to the main hall, where they were setting up a video call with Yukihiro (matz) Matsumoto, the developer/designer of Ruby. His talk was called 'Ruby 124C141+'. The name referred to a science fiction novel of a similar name. 124C41 meant "one to foresee for one", and he was basically all about the future of Ruby Language. His talk was interesting and informative. The audience went crazy.

After that I attended Sitting in Sai Venkatakrishnan & Hari Krishnan's talk "Concurrency patterns with Ruby"(which I did not pay much attention to) and "Mortal Kombat" presented by SlideShare Designer, Arun J and Lead Developer, Kapil Mohan(which was pretty interesting, and they addressed the code-embedded-in-template problem by using hquery).

I had lost my Relience Netconnect Datacard which I found mentioned on Gautam Rege's tweet.

Pre and during dinner I spent my time talking to the other delegate/speakers. Interacting with them was good fun. I had to leave at 8:30pm, otherwise I would not have got a bus back.

Stay tuned for Day 2.

Friday, February 26, 2010

GNUnify '10 or How I managed not to screw up my talk on Dorrie

Kushal Das just came out with his blog post on his Python Workshop at GNUnify '10 and I realised I hadn't published any on my experiences.

So here goes.

I sent in my proposal for GNUnify '10 on 5th of Feburary, which was apparently the last day. So when the first schedule came out, I wasn't listed and my proposal showed a "Pending" status, so I thought maybe I would visit as a delegate.

By some twist of fate the proposal suddenly got accepted, and since my talk was on Dorrie, I realised that meant I had to add some more features to it so that my talk is not the same as the one I gave at FOSS.IN/2009.

Unfortunately there was little time to do that and combined with my sudden realisation the day before GNUnify was to start, that it would start on Friday(the next day) and not Saturday, I found myself at the event without any slides or new features.

Day 1, GNUnify I could not do anything useful as my laptop was being used by Mr. Amit Shah, the KVM developer. I however attended both his talks and found them quite interesting. (Was wondering why KVM is never demonstrated as an example by professors teaching Computer Science students about Virtual Machines and how much interest that would gather from the classroom.)

That night and the next morning (Day 2), I spend trying to add proper spin building messages into the web interface and getting a "Download ISO" link up. Then I updated my slides.

Right before my talk Hiemanshu Sharma was talking about "Building your own Fedora Remix" and I thought that would be an apt introduction to the next talk (which was my talk on Dorrie), which dealt with a "Web interface for building your own Fedora Remix". Unfortunately, Hiemanshu's talk was predominantly lacklustre and lost quite a bit of the audience.

I went up next with my talk on Dorrie. This talk, as compared to one I delivered at FOSS.IN, was went pretty awesome. I was talking and not blabbering and managed to connect with whatever people were present in the audience.

Here is a picture of me waiting for the "Download ISO" link to turn up.(Courtesy Kushal Das)

Shreyank

You can download my slides from here.

Sunday, January 31, 2010

Mallus, Fish and Coconut Oil

It's been two weeks since I moved in with Minto and Praveen and I am having quite a bit of fun.

For starters I have cut down heavily on Outside Food and am having more home cooked food. Simple but tasty home cooked stuff. Bliss.

I always liked cooking. I never could, because I'm too lazy to learn. I never would because I do not like cooking for just myself. Life gets only as good as you can share it, I believe.

So I cook some stuff now and then. Recently I have specialised in the art of cooking Dal Khichdi. The Mallus like it, so I am happy.

We have unwritten rules for the kitchen. For each food item, one of us is the Head Chef and the rest have to listen to him and help regardless of all conflicts. Almost always yields good results (and we know who to blame if something goes wrong).

Today we got some Sardine and a Surmai Fish from the Hadapsar Mandi. We cooked Dal Khichdi with Sardine fried in Coconut Oil for lunch. It was strange because I had always heard Mallus had food cooked in Coconut Oil and I had only used Coconut Oil on my hair, body and door hinges. Putting tablespoons of Parachute Coconut Oil in the frying pan, watching it melt and thinking that I would soon have food cooked in it was, you know..


Lunch tasted good.

A nap and a shower later I took my Mallu roomies to Pune University road, which is quite far from Magarpatta City, to a Bengali Restaurant called Radhika for a taste of some good Bengali Cuisine. We ordered a platter with Mutton Curry and Fried Rohu fish. I also ordered Shorshe Ilish when Praveen declared he does not like the mustard taste. Even Minto found the taste a 'bit intense'. So I ordered another Hilsa without the mustard gravy which the Mallus enjoyed (probably). We finished up with Mishti Doi and Jolbhora Sandesh.

Surmai is waiting the Freezer to be cooked tomorrow for lunch.