random thoughts

Learning a New Programming Language

Learn at least one new language every year. Different languages solve the same problems in different ways. By learning several different approaches, you can help broaden your thinking and avoid getting stuck in a rut.

Andy Hunt, Dave ThomasThe Pragmatic Programmer

So true. It does change the way we think and code. But learning a new programming language is not just reading manuals, books, tutorials. That is not going to help. Executing the sample code is not going to help either. ( it did not at least for me)

Unless solving a real problem or working on a real project its not going to help learn the language.

IMHO solving problems listed in projecteuler.net helps a lot in learning a new language.

I have just started writing solutions in Scala and Ruby and IT IS helping me a lot to learn these two languages.

I am also learning Python, and Clojure is next in the to-learn list with Haskell and Erlang.

A Simple Todo List Manager Becoming Complex

Recently i started a todo list manager project as a way to learn ruby on rails.

Though this is not my first rails project, am still in the learning phase.

i wanted to create a simple to-do list manager with UI as simple as twitter.

One textbox to write the task to be done and thats it.

i did not want to have a calendar link to select due date , no options to select the priority… etc.

i want to capture maximum details possible in the single text box.

later i can extract the details using regular expression in the controller

(Aaah… regular expression another topic in my to-read list.)

First it was a little difficult for me to get the right regex for the string patterns,

later with a (first)question posted in stackoverflow.com i got the solution for that.

thanks to @Jens and @sawa for providing the right regex for my need.

still i keep getting ideas to make it as easy as possible for a user to enter his/her todo task with all details in

a single text box, but each idea is making the code more complex.

i am working on this project with a very little spare time that i get, so it may take sometime to make it online and publish the code in github.

Using Github Thru Dropbox

I am working on a simple rails app and am also using github for SCM.

Though installing msysgit and accessing github worked fine initially, i was not able to push my app later. The problem was my corporate network that did not allow me to upload data more than a KB. . A simple search in google i found out how to use git in dropbox .

here’s the how to i skimmed from stackoverflow

1
2
3
4
5
6
7
8
9
10
~/project $ git init
~/project $ git add .
~/project $ git commit -m "first commit"
~/project $ cd ~/Dropbox/git  
~/Dropbox/git $ mkdir project.git
~/Dropbox/git $ cd project.git
~/Dropbox/git $ git init --bare
~/Dropbox/git $ cd ~/project  
~/project $ git remote add origin ~/Dropbox/git/project.git
~/project $ git push origin master