Sunday, April 20, 2008

Starting Rails Project from Scratch - Part 1

While I've been working with Rails for about 4 months now, I've never started any project from scratch. As I'm doing my personal project while also learning more about Rails, let me just document my journey here.

I'm creating my project with Rails 2.0.2 on Windows platform using Netbeans as the IDE. Somehow Ruby programs take some time to load on my PC, which is why I have some extra time to write this, lol.

OK, let's go to the meat. These are the first few steps I did.

Configure Subversion for Rails
http://wiki.rubyonrails.org/rails/pages/HowtoUseRailsWithSubversion
Just follow it blindly. I tried to be smart and end up missing out some things. Don't forget to create the branches, tags, and trunk structure in the first place.

Import to NetBeans
And ignore the NetBeans project files: svn propedit svn:ignore nbproject

Use Piston for Plugins
http://www.rubyinside.com/advent2006/12-piston.html
Those unfamiliar with Piston need to know that Piston doesn't work like script/plugin. You must specify where the plugin files are created.
piston import http://dev.rubyonrails.org/svn/rails/plugins/simply_helpful/ vendor/plugins/simply_helpful
Add authentication using Restful Authentication
http://railscasts.com/episodes/67
http://www.railsforum.com/viewtopic.php?id=14216

Note:
If you're following the Railscast and creating "session" controller instead of "sessions", this error might happen when you try to log in:
Error: uninitialized constant SessionsController
at routes.rb add this
map.resource :session, :controller => 'session'
instead of
map.resource :session

Thursday, April 17, 2008

People You May Know in Facebook

This is the kind of feature that I have been hoping to have in social network sites, yet none of them that I know did although it's very simple to implement. And here is Facebook doing it, although it's way too late. Unfortunately, the first 3 people they show on my home page are people that I don't know. Going to the details, I only found one guy that I really know. I guess my network in Facebook is pretty saturated.

Sunday, April 13, 2008

Countering The Dead Sea Effect

There is a new idea called the Dead Sea effect which is basically saying that in large corporate, the more talented IT engineers are the ones most likely to leave because they're they most likely can't put up with the stupidities and inefficiencies in the workplace, not to mention all the problems.

And the worse thing about it is the vicious cycle effect that happens. Talented IT engineers are not likely to join a defunct team and the only way they can get a talented people is from entry positions. But they'll leave too once they know enough.

How to escape this situation? I don't think it's impossible, but it's certainly difficult. This is what I thought. First, get a talented people (of course, if they can find it), pay them high, and give them super power (authority). Talented person knows talented people. He'll get either his talented friends, or he'll hire other talented people. Then they'll start fixing things up. Looks simple? No. It's very difficult because they'll face resistance from old people who're afraid they'll lose their jobs. These people may even hide important informations (you know, the tricky parts which only one guy knows) or restrict access to them (you can't touch my server!) making their progress slower. Not to mention that whatever they want to change will have rotten codes which are very difficult to understand. But I believe it's doable, given that the people doing it strife till the end. Or they might just decide that enough is enough, no amount of money can make them do this, etc. Then the company is screwed.

Eventually, the best way for them is probably to keep the way things are. They're big, they can afford it. But if they want to beat the competition, they should look into how they can make their IT more agile. A good in-house IT team can make a lot of things happen. The least, they can cut down the manual works. Then, with software applications, they can make people work more efficiently and faster.

Saturday, April 12, 2008

Moving Vista Taskbar Buttons

Five years of development and the Windows team can't get a simple thing right.

The first few days I used Vista, there was one thing I expected to work, considering that Vista is a major improvement for Windows. That thing is moving the taskbar buttons around to arrange them in the order that I like. Linux desktop managers can do that since a long time and I was expecting that Vista was able to do it since it's just a simple thing. Guess what, it didn't work.

Arranging the taksbar buttons is so important for me that if one of the application crashes, I'd rather restart the others just to arrange it again. That's during the Windows time anyways. Because I've been using Linux on work for quite some time, it's not an issue anymore. Of course there are some free third party applications to do it, but why do we have to deal with it when it should be part of the OS?

It's always good to know that things are where you expect them to be.

Thursday, April 10, 2008

Remember the Milk widget crashes Firefox 2.0.0.13

Just to make the noise louder, my Netvibes started crashing my Firefox since a few days ago. I thought Netvibes will fix it soon but it doesn't happen and it's getting itchy here. A Google search later, I found that the problem is with Remember the Milk widget. I archived the widget and Netvibes works again.

Sunday, February 24, 2008

Way to lose your site user: ban them

I haven't used StumbleUpon for a long time and when I wanted to use it, this is what I get.



OK, so some spammers used my dynamically allocated IP address and created a lot of accounts and StumbleUpon banned the IP to protect themselves.

But I'm a logged in legitimate user and I'm also banned? Well, I won't bother contacting them for this. I'll simply don't use it until I feel like it, which might be a few months, a year, or never.

Wednesday, December 5, 2007

Python makes you fly



That's about what I felt when I learned Python. It really opened my eyes to a whole new world. What I thought was scary like dynamic typing turns out to hardly matter at all (provided the the code is well written of course, otherwise it's hell).

Then the new concepts that I found from scripting languages like strong vs weak typing, dynamic vs static typing, list comprehension, functional programming, closures, map, etc. It's just so cool.

I thought I need to tune my brain to different way of thinking when programming in scripting language. Turns out I'm doing alright. What needs tweaking is the way I tried to solve a problem, apparently. I think I need to zoom out and see things as a whole.