Life Of Navin

Random Musings, Random Bullshit.

kc

Semester 7 : The Good Parts

Aah... that feeling at the end of the semester. That warm fuzzy feeling when all the memories of the 5 months that have just passed by flood the mind. Semester 7 is particularly a remembrable semester for me, for reasons both good and bad. The whole semester was like a rollercoaster ride, always something happening...


There's no point in hanging on to the sour memories though, because the good memories always outlive the bad ones. So here's some of the best memories of my semester:

Semester 7: The Good Parts 



Technix 5.0
Wow, so much pure awesomeness happened in Semester 7. Starting off with the big one: Technix 5.0 . Almost 8 months of work culminating into 3 days of lectures, events and workshops. Technix is the annual technical festival organised by the Computer Science department of Goa Engineering College, and this year, it was our turn to take Technix a few steps further from where it was left last time around, and I was glad to say we didn't disappoint. Technix was the biggest technical festival held in college in recent years in terms of participation, collaboration, and sheer hype. And it was my honour to stand at the helm of affairs as General Secretary of CURSOR (the Computer Students' Organisation) in the organisation of this event. The whole experience as part of CURSOR both as SE Executive (in my second year) and General Secretary (in my third year) taught me a lot of life lessons and were some of the best times spent in college. I'd highly recommend everyone to try a taste of college politics. Do read this as well :)

Tandav: Tandav is the intra-college cultural/sports festival of college. After a dismal performance last year, the COMP department was in full prep mode to bring back the Tandav trophy home where it belongs. The Sports segment of Tandav had an amazing bunch of events, and it was awesome to see such spirit and competitiveness among branches. My favorite sports event was the volleyball finals between MECH and COMP (which was an event very personal to COMP, since we lost last year, after a lot of not-really-sportmanlike language/behaviour by MECH players (and final year students) last year). This year, we were out with a vengeance, and since we were the seniors, we weren't going to be pushed around by anyone. The match was the match of a lifetime, staring off with the first 2 sets getting split between MECH and COMP. The final set was a complete romp by the COMP team, and by complete romp, I mean the only way it could be described was as a thrashing! It was brilliant to see the exact opposite of last year's event take place. The MECH supporters had been silenced after a yearlong wait. Oh, sweet revenge! :) Many slogans that originated on that day, such as 'Di Teka', and 'Umeshachi Pepsi...' still ring in my head.

Boycott Scenes
But sports was just half the Tandav story. Next up was the Battle Royale: the cultural trophy... Over the years, the cultural trophy was of Tandav, an event meant to bring the college together through talent, had led to massive branchism in college. Initially, this branchism showed up only during Tandav, but as time went on, branchism which started off at Tandav would veer it's head through the entire year, leading to the college getting split into 6 seperate colleges (6 branches). Since winning became more important than participating, cheating slowly began to rise, to the level that even faculty judges were "fixed" beforehand. This time around, the same thing happened, and the IT branch was heavily favoured. Irrespective of performance of their participants, that branch seemed to be winning every event with ease. Many stories of fixing rose through trusted backchannels, and it reached a stage where certain branches started asking for a boycott of Tandav altogether, in a "Either play fair, or don't play at all" message. COMP was one of the branches as part of this, and while we did not support a boycott of Tandav, we were strongly for fairness in Tandav. At the end of a set of discussions with the organising students' council and faculty involved in the very conception, the conclusion reached was that Tandav has to go on as scheduled irrespective of judging issues. This was unacceptable to 3 branches, COMP, CIVIL and a large segment of IT, who said they'd much rather lose Tandav fairly than win unfairly (Respect to IT students). So, a boycott resulted. And it seemed like our last Tandav was going to end on that sour note.

 During 'Summer of 69'! :)
But then something amazing happened. When discussions with the Students' Council was ongoing, I had suggested that we continue Tandav as it is, but remove the concept of scoring, winners and losers from it, since any 'Winner' at this point is useless because events were fixed. Since people had all prepared, some for weeks, I personally felt it was wrong to boycott the event and put to waste all their preparation. Somehow, as the day went on, this idea garnered more and more support, and a few hours later "Amchee Tandav" aka "Tandav 101" was born. One large room, A little convincing of the security guard, Speakers from the hostel, invites via SMS /Phone calls /word of mouth, and in under an hour we had 3 branches that had "boycotted" Tandav come together to have Tandav the way it was supposed to be. People who had slogged weeks off in preparation got a chance to perform in front of their true fans. COMP students said CIVIL slogans, CIVIL students said IT slogans, and we all screamt 'Dara Singh' (Our notorious college slogan). It was a super proud moment for me to see students united as Engicos rather than branches, and it was even more awesome to know that  I was one of the people who made it happen! Multiple dance performances, band performances, and song performances later, I was sure this was the greatest ending to Tandav I could expect. Only thing missing was the Fashion Show, which we could not have due to lack of space for a ramp (We honestly hadn't expected soooo many people to show up).

Performing Socha Hai! :)

15 mins of wondering what to do, and BOOM. Someone came up with the idea of a basketball court fashion show. One hour later, the whole crowd had shifted to the basketball court. Carlights, a set of large speakers which had automagically appeared there, some superb freestyle dancers (I still don't know where some of them came from! :P) and Tandav was taken to another level. The most common comment I heard was "Dude, this is like Step Up", and I sooo totally agree! I never knew we had such awesome freestyle dancers in college! It was awesome! And the ending of Tandav 101: The fashion show ofcourse. Call me partial if u want, but that was the hottest fashion show I've seen in my years in college! All in all, Tandav 101 was one of the best days of my life. :)

Hard Rock Cafe! :)
Along the semester, I had a superawesome trip to Pune with Douglas (@mistcrafter), Sahil (@FlamesAlchemist), Damodar (@genzen21) for Pycon 2011. It was 4 days of getting lost in Pune, reaching awesome places, having awesome experiences, and just going completely crazy! Pune is one awesome city, and I really hope I get to visit there more often. My fondest memories of the trip (besides PyCon itself) are the night we decided to watch "Spirited Away", a movie which Sahil claimed was the best animated movie ever made, but at the end of which we all felt we've been on drugs for the last few hours, and the trip to Hard Rock Cafe (where we were lucky enough to listen to Dream On by Aerosmith played inhouse \m/). The whole trip was a geek outing and it was great to be together with fellow geeks :)

Besides this was the trip to Bangalore to relax post-Technix, countless picnics, numerous trips across the state and beyond with friends, Crazy amount of silliness we've been upto, strengthening bonds with people who're nothing short of family to me, as well as with other friends, a never ending list of personal projects, website designs and code, a tonne of internal politics (which I'll really miss post college), all the memories created in Hostel, including the hostel parties and a tonne of other stuff!

 
People close to me know that the semester hasn't really been easy on me... but let's leave all the sour memories for some other time (or another blog post). Because right now, with these memories, I can confidently say, I've lived life to the fullest this semester... and that's all that I can ask for! :) 

My Examtime Online Presence [Infographic]

1. Join every site known to netkind 2. Become active on all of them 3. ??? 4. Profit!!!Give a person a fish and you feed them for a day; teach that person to use the Internet and they won't bother you for weeks.  - Anonymous 

10 things I Learnt As General Secretary

My first impression of a General Secretary

My earliest memories of college are of this guy named Shakir Usman, the General Secretary of the college students' body talking at the Freshers' Day function (2nd week of my college life), and from that moment, I've wanted to be involved in college politics. I'd be lying if I said he didn't play a part in me wanting to become part of "the system" somewhere down the line.

Over the last year, I was the General Secretary of the Computer Students' Organisation (CURSOR), the students' body of the Computer Engineering Dept. of my college. Last Thursday, I handed over charge to a new set of bright juniors, and I have complete confidence (knowing many of them personally) that they'll take CURSOR to new heights! :)

This is NOT a blogpost praising what we've done or to put someone else down. I'm sort of against tooting my own horn. This is a blogpost that (I hope) every Students' Council member, irrespective of college/branch can relate to. And I hope juniors get a fair idea of what expect as part of the Students' Body, when the time comes for them to take charge. These are 10 things I learnt through my year as General Secretary at CURSOR
  1. There's Nothing (And No One) To Fear
    One major reason that I've heard people give for not indulging in college politics is the associated "fear factor" with it. Teachers will hate me because I'm in the Students' Council (I have no idea where this rumour started from), People from class will hate me (Some maybe, at first, but if you're effective, it won't last for long), My girlfriend will hate me (Really? How insecure are you?). For us, there was this certain teacher whom everyone feared, for god knows what reason. She's hyper, a little mad, crazily eccentric, but then again aren't we all? :P You have to realise, everyone's human! It's just about getting that person's soft spot! Be a newborn child.... Have no fear, no preconceptions about people, or about "the system" as a whole.
  2. Dream Big
    The reason why most students' councils end up being dull issues are because of people too afraid to dream big. Don't always be serious. Don't be practical. Dream BIG. What's the worst that can happen? A plan that doesn't take off? A plan that falls plop on it's faces? I know this'll sound really cheesy, but starting off is winning half the battle!
  3. Think First, Talk Later
    When you're in  a Students' Council, especially in a executive post, your opinion is many times considered the opinion of your class, or (in worse cases) of your branch. While this is good in some cases, there are times where your personal opinions are misinterpreted as opinion of the masses. And sometimes, these opinions come back to bite you on your bum. Having personally experienced this, I learnt my lesson...
  4. Get Your Hands Dirty
    This is something that I'm sure people have heard about in the past. Students' Council is basically politics, a dirty game, with many underhanded tactics and people without any morals. I won't lie. This is partially true. As part of your work, you'll have to work with many types of people, come up with everything ranging from barters to straight out blackmail to get things done, consider various options ranging from ethical to unethical. I personally tried my best not to work unethically, and the worst I went to was a gray area! Just know that whatever you decide, have the guts to follow through!
  5. Nothing Is Easy
    People who've never been in any student body think it's really easy to be in a council. I even heard stuff like "It's a license to bunk" or "Dude, it's just timepass". This may be true if your plan is to just cruise along the year. However, if you want to get any sort of change or make an impact, you have to realise that nothing is easy! The college hierarchy is NOT made to aid change, and while some things will be logically tasking, others will be time hogs, while others will be emotionally tasking (Read No. 7)
  6. Credit is NEVER yours.... Unless something goes wrong!
    This applies to the whole council, and more so to the General Secretary. When something goes right, irrespective of the actual contributors, the achievement is of the class (and branch), but if something goes wrong, it's directly blamed on the Council (and the General Secretary specifically). I personally believe in the "Never Blame Anyone Else" philosophy, something that I learnt from one of my personal heroes, and have always tried to step up and take the blame for the team's mistakes (whenever possible). Nobody's perfect!
  7. The Team ALWAYS Comes First
    My Team! :)
    Like I mentioned before, people outside the council simply cannot understand how or why a student body works, and as such the remaining members of the council become nothing less than your family. These will be the few people who'll understand exactly what you're going through, and how to help.Keeping secrets is part of your job profile, but thankfully, you can share most of those secrets with these people. I was glad to have superawesome people like Rohan Hodarkar (as Treasurer), Anamay Tengse (as Technical Secretary) and Pranali Naik (as TE Executive), who were always there to share the load! It's only because of the way that we gelled together that we managed to do so much through the year, and pull off GEC's biggest technical festival in recent years: Technix 5.0
  8.  Help comes from the least expected places
    Yes, it happens! I've had help coming in from teachers who've traditionally hated me, people with whom I've never really gotten along with, people who you didn't think could help (eg. security, sweepers, electricians), random people (literally, people who heard we're in a sticky situation and came forward to help), etc. In fact, in many cases, your "contacts" which are lower in the "presumed" hierarchy tend to get stuff done faster than the bureaucratic upper hierarchy. Trust me, never ever close a door.... keep everything half open! Because you never know which door will be pushed open in your time of need!
  9. Shit Happens...
    One of the most important things you have to learn: Shit happens... Quite a bit in fact. Our dear Mr. Murphy plays his part in full and stuff starts going haywire. But it's all about keeping stuff within your control. Never write plans in stone! Plans often change at the last moment for a variety of reasons, but you cannot, I repeat, cannot put your hands up in the air and give up, or get all hyper about it. Expect things to go wrong. Terribly wrong. Heck, I even considered the probability of a hurricane happening on the day of an event! :P Still sometimes stuff won't go the way it's planned. Don't take things to heart.... Unless you accept your failures, you're not fit to even think about your successes!  
  10. but EPIC EPIC AWESOMENESS Happens more often!
    At the end of the day though, you end up having an EPIC time as part of a Students' Body. You'll make friends for life (isn't that the whole point of college?), you'll learn to take responsibility for your actions, you'll learn the value of money (I'm sure Rohan will grin if he reads this! :P), you'll live life on the edge (and off it at times), you'll mess around in everything ranging from politics to administration to plain out marofying. You'll see the best in people, you'll see the worst in people. Some people will trust you with their confidence, others with their bullshit. Everything you say or do seems more professional because it's coming from a person in a post of power. Respect will have to be earned, but once it's earned, it stays! Crazy incidents will happen, both behind and in front of the scenes. You'll laugh, you'll cry, you'll hurl insults, you'll beg, you'll scream, and most importantly, you'll live! 
How very true...
Long story short, being General Secretary of CURSOR was one of the best experiences of my life. It was an absolute honour to lead Team CURSOR through the year, and stay at the helm of affair. All those closed door meetings with teachers, all those maddeningly frustrating arguments, all those crazy experiences will remain with me till the moment I die (and probably even beyond). It was truly a superb experience to work with some of the brightest minds in Goa, and do so much! :)

An(n)atomy Of College Priorities!

You're either with me or you (probably) support an alternative version of the LokPal bill which automatically makes you an immoral anarchist governmental pig hell bent upon destroying the integrity of this great country. Also, you most probably can't get laid in a women's prison with a handful of pardons.Humko azadi aadhi raat ko mili thi aur savera aaj tak nahi hua.. -Shabana Azmi (on Twitter)

LEX and YACC on Windows

We've just started compiler design as part of the Language Translators subject at college and a practical aspect of it involves using LEX and YACC for Grammar Lexical Analysis and Parser Generation. Since LEX and YACC are both originally developed for the *nix OSes (read: Linux), there was a sudden rush of classmates downloading linux distros (Fedora being the default choice as it's used on lab systems). In many cases, people actually downloaded entire distro DVDs just for LEX/YACC!

NOTE: When people say they use LEX and YACC, almost always, what they mean is FLEX (Which is an alternative to Lex) and BISON (which is part of the GNU project) /BYACC respectively.

Sticking with the "When in doubt, try another hole" philosophy, I just googled around a little and came up with a much easier solution.


Here's how to set up FLEX and BISON on Windows systems

1) Download the Windows version of FLEX
Link2) Download the Windows version of BISON
3) Download a C/C++ Compiler (If you say TurboC, I'll reach out through the monitor and thump your head)... I recommend DevCPP or Code::Blocks
4) Install all 3. It's recommended to install in folders WITHOUT spaces in their names. I use 'C:\GNUWin32' for FLEX and BISON and 'C:\CodeBlocks' for Code::Blocks
5) Now add the BIN folders of both folders into your PATH variable. Incase you don't know how to go about this, see how to do it on Windows XP ,Windows Vista and Windows 7. You will have to add ';C:\GNUWin32\bin;C:\CodeBlocks\bin' to the end of your PATH
6) Open up a CMD prompt and type in the following

C:\flex --version
flex version 2.5.4

C:\>bison --version
bison (GNU Bison) 2.4.1
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

C:\>gcc --version
gcc (GCC) 3.4.2 (mingw-special)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you do not get the output as above, restart your system and try again.

That's it! You now have a Bison and Flex set up! Now for some coding! :)

Create a Lex file, let's say "exp.l" and open it up in your favorite text editor (read: Notepad++)


%{
#include
#include "y.tab.h"
%}

%%
[0-9]*[02468]"\n" { return EVEN; }
[0-9]*[13579]"\n" { return ODD; }
%%
int main(void)
{
yyparse();
return 0;
}

int yywrap(void)
{
return 0;
}

int yyerror(void)
{
printf("Error\n");
exit(1);
}


Similarly create a YACC file as well, say "exp.y" and edit it as follows


%token EVEN ODD

%%

input:
EVEN { printf("EVEN NUMBER\n"); return 0; }
|ODD { printf("ODD NUMBER\n"); return 0; }
;


Now in the CMD prompt, navigate to the folder where the exp.l and exp.y files are and run the following commands:

C:\LT\example>flex exp.l

C:\LT\example>bison -dy exp.y

C:\LT\example>gcc lex.yy.c y.tab.c


At each step, assuming all is well, you won't get any output. Note that the final step compiles the C files generated by FLEX and BISON. And generates a executable named a.exe (To use a different name, change last command to "gcc lex.yy.c y.tab.c -o nameofexecutable.exe" )

C:\LT\example>a.exe
666
EVEN NUMBER
C:\LT\example>a.exe
667
ODD NUMBER


Now just run the program (through the command prompt itself). For and even number input, it prints out "EVEN NUMBER" and exits and "ODD NUMBER" is printed for odd numbers. A simple example, but I guess it gets the point through!

Enjoy! :)

PS The GnuWin project is a superawesome project which "provides ports of tools with a GNU or similar open source license, to Windows". The number of packages that they've ported to Windows is amazing. Do check it out.



PPS Yes, I'm a FOSS/Linux enthusiast, but that doesn't mean I have to praise Linux all day long! Projects like GNUWin, which take code to the masses, are nothing short of brilliant! Linux distributions have so many advantages over Windows for any real developer, but I honestly believe every developer has the right to "choose" his/her development OS and environment, be it PC, Linux or Mac. Do try out Linux distros as well (infact, I'd highly recommend you try a few before deciding which suits you best! Most distros are free!), but don't get dragged down by an environment! An OS is simply a tool to enable you, the developer, to work your magic! :)

Update: Here's a Zip file of FLEX, BISON and the Source Code used in this post.

The Week That Was....


... Just incase you wanted to know!

Using Hobo With Rails 3 and MySQL!

For my college project this semester, We (me, Damodar "Damu" Dukle and Poonam "Patlinbai" Patil) chose to use Ruby on Rails, a framework that has been used to create tonnes of stunning webapps. As a developer, Ruby on Rails (or RoR) has been of great interest since the "Convention over Configuration" philosophy RoR emphasizes upon leads to a quick, non-repetitive coding. For the backend, we decided to stick with MySQL, a SQL that all 3 of us are experienced and comfortable with.

Now for our project, we'll be designing a webapp called Press Play, a sort of Napster meets Last.FM meets SoundCloud mega-mashup... more on that some other time (probably once we finish it).

Now, one of the first things we needed to get done was user authentication. And I recalled Kaustubh (@geekblues) telling me about Hobo, a framework that builds upon RoR, and simplifies tasks such as user authentication, permissions and object lifecycles. And after using Hobo, I must say, I am very impressed! :)

The following is a simple tutorial to get up and running with Hobo on Rails 3.x.

1. Setup Ruby and Ruby on Rails. Follow this tutorial if you need to.

2. Next step is ofcourse to install the Hobo gem. Now there's a small issue here. If you use the stadard gem install hobo command, it installs Hobo 1.0.3, which is incompatible with Rails 3.x. Hence we use the command gem install hobo --pre , which installs a prebuild of Hobo 1.3.0, which is compatible with Rails 3.x.

C:\Press_Play>gem install hobo --pre
Fetching: hobo-1.3.0.pre29.gem (100%)
Successfully installed hobo-1.3.0.pre29
1 gem installed
Installing ri documentation for hobo-1.3.0.pre29...
Installing RDoc documentation for hobo-1.3.0.pre29...

3. Start MySQL . Let's use XAMPP here as well (as discussed here). Install the mysql and mysql2 gems using

C:\Press_Play>gem install mysql
Fetching: mysql-2.8.1-x86-mingw32.gem (100%)
Successfully installed mysql-2.8.1-x86-mingw32
1 gem installed
Installing ri documentation for mysql-2.8.1-x86-mingw32...
Installing RDoc documentation for mysql-2.8.1-x86-mingw32...

C:\Press_Play>gem install mysql2
Fetching: mysql2-0.2.6-x86-mingw32.gem (100%)
Successfully installed mysql2-0.2.6-x86-mingw32
1 gem installed
Installing ri documentation for mysql2-0.2.6-x86-mingw32...
Installing RDoc documentation for mysql2-0.2.6-x86-mingw32...

Navigate to the XAMPP install folder ->mysql ->bin (Generally C:\XAMPP\mysql\bin) and then copy the libmysql.dll file. Paste it in the Ruby install folder-> bin (Generally Ruby192/bin). Overwrite if you need to.

4. Run XAMPP and Start the MySQL service from the Control panel


5. Now it's time to put Hobo into action. Assuming your project name is Press Play (stop copying our project! :P ) and you too want to use MySQL, do the following

C:\Press_Play>hobo new Press-Play -d mysql
Hobo Command Line Interface 1.3.0.pre29
Generating Rails infrastructure...
create
create README
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create app/mailers
create app/models
create app/views/layouts/application.html.erb
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/environments
create config/environments/development.rb
create config/environments/production.rb
create config/environments/test.rb
create config/initializers
create config/initializers/backtrace_silencers.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/secret_token.rb
create config/initializers/session_store.rb
create config/locales
create config/locales/en.yml
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create doc
create doc/README_FOR_APP
create lib
create lib/tasks
create lib/tasks/.gitkeep
create log
create log/server.log
create log/production.log
create log/development.log
create log/test.log
create public
create public/404.html
create public/422.html
create public/500.html
create public/favicon.ico
create public/index.html
create public/robots.txt
create public/images
create public/images/rails.png
create public/stylesheets
create public/stylesheets/.gitkeep
create public/javascripts
create public/javascripts/application.js
create public/javascripts/controls.js
create public/javascripts/dragdrop.js
create public/javascripts/effects.js
create public/javascripts/prototype.js
create public/javascripts/rails.js
create script
create script/rails
create test
create test/fixtures
create test/functional
create test/integration
create test/performance/browsing_test.rb
create test/test_helper.rb
create test/unit
create tmp
create tmp/sessions
create tmp/sockets
create tmp/cache
create tmp/pids
create vendor/plugins
create vendor/plugins/.gitkeep
apply C:/Users/navin/AppData/Local/Temp/hobo_app_template
gemfile hobo (>= 1.3.0.pre29)

Now is where Hobo shows it's strength... the Hobo Setup Wizard offers to run. Let's have a look at it shall we?

Hobo Setup Wizard
Do you want to start the Setup Wizard now?
(Choose 'n' if you need to manually customize any file before running the Wizard
.
You can run it later with `hobo g setup_wizard` from the application root dir.)
[y|n] y
=> "y"

Startup
Installing Hobo assets...
create app/views/taglibs/application.dryml
create public/stylesheets/application.css
create public/javascripts/dryml-support.js
create config/initializers/dryml_taglibs.rb
create app/models/guest.rb

First thing is Customizing the test framework. Let's leave that for later! So say n

Test Framework
Do you want to customize the test_framework? [y|n] n
=> "n"

Next up is a name for the user resource. If you;re writing a movie webapp, you may want to use the term "moviebuff" instead of "user".. For now, I'll stick with "user"

User Resource
Choose a name for the user resource: [<enter>=user|<custom_name>]
=> "user"

You know how those fancy sites send an activation email when you create a new account? or those sites which are invite only (Did someone say Google? :P )? Well, using Hobo, you can have both those features with complete ease!

Do you want to send an activation email to activate the user? [y|n] n
=> "n"

Invite Only Option
Do you want to add the features for an invite only website? [y|n] n
=> "n"

Since I'm comfortable with erb, I want to be able to use the erb templating system as well alongside the default dryml system. This can be done in the next step

Templates Option
Will your application use only hobo/dryml web page templates?
(Choose 'n' only if you also plan to use plain rails/erb web page templates) [y|
n] n
=> "n"

Hobo Rapid
Installing Hobo Rapid and default theme...
create public/javascripts/hobo-rapid.js
create public/javascripts/lowpro.js
create public/javascripts/IE7.js
create public/javascripts/ie7-recalc.js
create public/javascripts/blank.gif
create public/stylesheets/reset.css
create public/stylesheets/hobo-rapid.css
create public/hobothemes/clean
create public/hobothemes/clean/images/101-3B5F87-ACD3E6.png
create public/hobothemes/clean/images/30-3E547A-242E42.png
create public/hobothemes/clean/images/30-DBE1E5-FCFEF5.png
create public/hobothemes/clean/images/300-ACD3E6-fff.png
create public/hobothemes/clean/images/50-ACD3E6-fff.png
create public/hobothemes/clean/images/fieldbg.gif
create public/hobothemes/clean/images/pencil.png
create public/hobothemes/clean/images/small_close.png
create public/hobothemes/clean/images/spinner.gif
create public/hobothemes/clean/stylesheets/clean.css
create public/hobothemes/clean/stylesheets/rapid-ui.css
create app/views/taglibs/themes/clean
create app/views/taglibs/themes/clean/clean.dryml
create public/hobothemes/clean-sidemenu
create public/hobothemes/clean-sidemenu/images/100-ACD3E6-DBE1E5-H.png
create public/hobothemes/clean-sidemenu/images/100-DBE1E5-FCFEF5-H.png
create public/hobothemes/clean-sidemenu/images/300-3B5F87-ACD3E6-H.png
create public/hobothemes/clean-sidemenu/images/spinner.gif
create public/hobothemes/clean-sidemenu/stylesheets/clean-sidemenu.css
create app/views/taglibs/themes/clean-sidemenu
create app/views/taglibs/themes/clean-sidemenu/clean-sidemenu.dryml

Front Controller
Choose a name for the front controller: [<enter>=front|<custom_name>]
=> "front"
Installing front controller...
create app/controllers/front_controller.rb
create app/helpers/front_helper.rb
invoke test_unit
create test/unit/helpers/front_helper_test.rb
invoke test_unit
create test/functional/front_controller_test.rb
create app/views/front/index.dryml
remove public/index.html
route match 'search' => 'front#search', :as => 'site_search'
route root :to => 'front#index'
Installing 'user' resources...
create app/models/user.rb
invoke test_unit
create test/unit/user_test.rb
create test/fixtures/users.yml
insert app/models/user.rb
create app/mailers/user_mailer.rb
create app/views/user_mailer/forgot_password.erb
invoke test_unit
create test/functional/user_mailer_test.rb
create app/controllers/users_controller.rb
invoke test_unit

OK, it's all done. Let's take the site live shall we? Let's migrate our database schema to MySQL. As it;s been throughout, it's a completely hassle-free process. Just choose your database migration option as 'm'.

DB Migration
Initial Migration: [s]kip, [g]enerate migration file only, generate and [m]igrate: [s|g|m] m
=> "m"
Migrating...
rake db:setup
(in C:/Press_Play/Press-Play)
C:/Press_Play/Press-Pla/db/schema.rb doesn't exist yet. Run "rake db:migrate" to create it then try again. If you do not intend to use a database, you should instead
alter C:/Press_Play/Press-Play/config/application.rb to limit the frameworks that will be loaded

---------- Up Migration ----------
create_table :users do |t|
t.string :crypted_password, :limit => 40
t.string :salt, :limit => 40
t.string :remember_token
t.datetime :remember_token_expires_at
t.string :name
t.string :email_address
t.boolean :administrator, :default => false
t.datetime :created_at
t.datetime :updated_at
t.string :state, :default => "active"
t.datetime :key_timestamp
end
add_index :users, [:state]
----------------------------------

---------- Down Migration --------
drop_table :users
----------------------------------
create db/migrate/20110326174912_initial_migration.rb
rake db:migrate
(in C:/Press_Play/Press-Play)
== InitialMigration: migrating ===============================================
-- create_table(:users)
-> 0.2700s
-- add_index(:users, [:state])
-> 0.2450s
== InitialMigration: migrated (0.5180s) ======================================


Next up, the internationalization (I18n) option

I18n
The Hobo supported locales are de en es it pt-PT ru (please, contribute to more
translations)
Type the locales (space separated) you want to add to your application or <enter> for 'en':
=> "en"
create config/locales/hobo.en.yml
create config/locales/app.en.yml
remove config/locales/en.yml

Hobo even asks you if you want it to set up a git repository for your new project and git init it!

Git Repository
Do you want to initialize a git repository now? [y|n] n
=> "n"

Process completed!
You can start your application with `rails server`
(run with --help for options). Then point your browser to
http://localhost:3000/

Follow the guidelines to start developing your application.
You can find the following resources handy:

* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
* Ruby on Rails Tutorial Book: http://www.railstutorial.org/

That's it! Really! Don't believe me? Check it out for yourself. Navigate to the folder Press-Play


C:\Press_Play>cd Press-Play

C:\Press_Play\Press-Play> rails server

C:\Press_Play\Press-Play>rails server
=> Booting WEBrick
=> Rails 3.0.5 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server

Fire up your browser and key in http://localhost:3000 . And if everything has gone well, you should see:


Yeah, a site with user authentication, individual profiles and hashed passwords all ready for you, and you haven't written a single piece of code yet! The first account created is given administrator priviledges, and priveledges of all other accounts are decided by this account.

Now it's all about customizing it as per your preferences... Check out some of the sites that were born exactly as your project right now: http://hobocentral.net/gallery/ ... Amazing eh?

I'd strongly suggest that you download Rapid Rails With Hobo, a free ebook of Hobo tutorials. Examples in the book make use of an older version of Hobo, so commands may not work out of the box, but it's still an excellent read! Also check out the Hobo cookbook for ideas on what can be achieved using Hobo.

Have fun with Hobo! :)

PS. The original plan was not to post on LoN this entire semester (a hiatus of sorts), but I just couldn't keep myself away! :)

Prologue

Finally after all these years, here's to the beginning of what was there, what is there and hopefully what will remain!! So here are my thoughts & words -Online!!

Blog Archive