Tuesday, December 26, 2006

EasyEclipse for C and C++

Perhaps educational institutions in Egypt teaching C/C++ should stop using the age-old Borland C++ 3.1 or even Borland C++ 4.5 for introducing C/C++ programming to their students. Now EasyEcplipse for C and C++ is an free open source IDE that can get the job done. It is based on the open source Eclipse project.

Integrating RadRails into InstantRails

After downloading and installing RadRails, I was clueless about how to use it with InstantRails. I tried to use RadRails but failed completely. This made me leave RadRails and confine myself to using InstantRails alone from the command line console and the rudimentary file editor that comes with it.

Hearing about how convinient RadRails is, I thought of downloading the Ruby on Rails stack one by one by myself and installing it, first Ruby, then rails and finally downloading and installing MySQL then configuring them all and running them. But that sounded like a headache, after all InstantRails was doing all this for me in a single step.

I then, by accident, came across this clear and simple description of how to configure RadRails to work with InstantRails! Mission accomplished.

Installing ActiveRBAC

I have downloaded and uncompressed InstantRails on my Windows XP system. In order to perform user authentication in my web application, I attempted to install the ActiveRBAC library for Ruby on Rails. Steps for installing ActiveRBAC are detailed in the excellent ActiveRBAC tutorial. However, to further take confusion away from installation steps, I will outline here the final steps I have come up with after some trial, error, failure then success on my side in installing ActiveRBAC on my Windows system.

  1. Start InstantRails.
  2. Open a Ruby console window.
  3. cd your_app_name.
  4. ruby script/plugin discover.
  5. Reply by no to all questions, except the two questions for http://svn.rails-engines.org/ and https://activerbac.turingstudio.com/.
  6. ruby script/plugin install engines.
  7. ruby script/plugin install active_rbac.

Congrats, you're done!

Monday, December 25, 2006

Trying Microsoft Office 2007

Perhaps I'm now a late adopter when it comes to Microsoft technologies and products, yet I just managed to try my hands with Microsoft Word 2007. I have not yet grasped the big change from the previous version of Microsoft Word except for the neater and sleeker interface. The interface looks and feels really cool. I believe also getting rid of the age-old concept of menus is a relatively big step. After all ever since the days of DOS, we've been used to programs using menus. Till this days almost every desktop program uses menus. So replacing traditional menus with this neat new way is quite cool and kind of a change in long standing concepts. This said, I still would like to say that the new way of getting about your tasks done in Microsoft Office 2007 is similar to a great extent to the old menu system, except that you see icons organized in front of you instead of a pull down menu. So in terms of programming, it's not really that different, yet in terms of usability, I believe it is a far concept from the age old pull-down menu style.

RadRails - IDE for Ruby on Rails

RadRails is the leading IDE for Ruby on Rails. RadRails is a far cry from FreeRIDE, the popular Ruby IDE. RadRails is way better. RadRails is based on the IBM-backed open source Eclipse IDE. RadRails is basically a plugin for Eclipse. RadRails is built on RDT, an Eclipse plugin for Ruby, and JRuby, a pure Java implementation of Ruby to work with Eclipse. Go ahead and download RadRAils and experience its magic.

Sunday, December 24, 2006

Wikipedia Challenges Google

The founder of Wikipedia is teaming up with Amazon to create a search engine the competes head-to-head with Google and Yahoo. The new search engine is called Wikiasari. The idea behind the Wikisaria search engine is to to be driven by the same kind of community force that has been driving the Wikipedia.

I personally believe that both Google and Yahoo will be fighting back ferosiously. Google's Co-op, Google Base and Google Apps for Your Domain programs offered by Google will be a strong force by Google in the direction of using the massive user community to help refine search results by classifying and creating content.

Code Igniter - A PHP Framework

As Django is a web application framework for Python, and Rails is a web application framework for Ruby, there is also Code Igniter, which is a web application framework for PHP. Code Igniter appears to be a much better PHP framework than CakePHP.

Converting ASP into PHP

ASP2PHP is a cool tool to convert your ASP code into PHP. Here is how to also convert your Access database into MySQL.

Agile Software Development

Extreme Programming is one of the popular, relatively new, agile software development methodologies. Scrum is another agile methodology that is gaining sweeping popularity. Both Scrum and Extreme Programming share the main concepts of agile software development, but while Extreme Programming focuses more on the details of how to do the programming, Scrum lifts itself a bit towards the project management level. Both methodologies can be used together at the same time: Extreme Programming for the technical part and Scrum as a project management wrapper.

Another agile software development methodology also gaining in popularity is Test Driven Development. There are many other new methodologies rising in popularity, but they all share the same concepts of Agile Methodologies. The Wikipedia has a good article about Agile Software Development.

User Authenticaiton in Ruby on Rails

Unlike in Django, the popular Python web application framework, Rails, again the popular Ruby web application framework, does not offer user authentication out of the box. If you want to do user authentication with Rails, you must use some plugin or write the authentication part of the web application from scratch. There are a number of ways to do authentication in Ruby on Rails. The salted hash loging generator is one popular method to do user authentication in Rails. Another method is the ActiveRBAC. RBAC stands for: Role Based Access Control. The nice thing about ActiveBRAC is that it offers more features the most important of which is allowing users to access parts of the web application based on roles. To get started, try your hands with this well-written ActiveRBAC tutorial.

Saturday, December 23, 2006

Ruby on Rails Forum

Get more familiar with Ruby on Rails and have your Rails questions answered at the Ruby on Rails Forum.

Google Uses Scrum

Google is using the agile Scrum software development methodology.

Google Co-op

Google Co-op is Google's attempt to involve users into enhancing the results of search engines. Google believes, and rightly so, that user involvement and user creating content, tagging and ranking are the necessary supplement to automated computer algorithms. This is the spirit of the highly controversial phrase: Web 2.0.

Second Life - A Real Life Game!

It took me quite some time to grasp the concept behind Second Life. Second Life is kind of a computer game. You can think of it as a multiplayer game. The main difference is that you don't just play with 8 or 10 players, but you are playing it with hundreds of thousands of players at the same time and you can interact with any of them while you are playing the game! Another crucial difference is that the game never ends. You just log in to the game at any time and you find it going on between the massive number of people playing in it. There is no win/loose situation like in regular games.

The interesting thing about Second Life, and similar 'games', is that you can build stuff inside the game. You can build a house, you can talk to other players, you can move around and you can buy things. The mind boggling feature of Second Life is that you can buy things with real money! This concept is the hardest to understand at first when you are new to Second Life. Yet there are people making a lot of money buy building houses for example in Second Life and selling such houses to other players in Second Life! You might think that this is kind of crazy, but think of it as someone painting a picture and selling it. The people who are building or making things inside Second Life and selling them with real money to other players are like those painting a picture then selling this picture or design to others. In Second Life, you buy and sell using artificial money inside the game, but you can later go ahead and exchange such artificial game money with real US dollars. That's the really amazing thing about Second Life and the most difficult concept to grasp at first. You can try Second Life for yourself to be able to better understand the whole concept behind it.

Renting Computer Processors

EC2 is a service offered by Amazon.com. It allows you to rent computing power. Renting hard drives to store your data has been a service offered by many and used by an increasing number of consumers. Now EC2 is offering rent not of storage space, but of computing power. Computing power of course is comprised of computer processors and RAM. The interesting thing about this service is that you can rent computing power as small as a 1.7 GHz processor to as large as thousands of such processors. Such processing power is prices by the hour. A very interesting concept.

Imagine Cup 2007

I hope Egypt programmers manage to win high ranks in Imagine Cup 2007.

ITWorx Web Site Redesigned

I would like to congratulate ITWorx on the recent redesign of their web site. I have long believed they deserved such a redesign. Now their web site more closely reflects their actual size and level. Congrats to the hundreds of Egyptian Software Engineers working at ITWorx.

Friday, December 22, 2006

Ruby Inventor Speaks!

Listen to the Japanese guy who invented Ruby. Yukihiro Matsumoto is the inventor of the Ruby language.

Ruby Developers in Egypt?

I came across this interesting site today, it's called Working with Rails. It is a community web site that allows Ruby on Rails developers to add their names and other info about themselves. I found 6 Ruby on Rails developers listed under the Egypt section of the site. I added myself, so now there are 7 Ruby on Rails developers from Egypt listed at Working with Rails. I hope this number increases many folds as time passes. I'm planning to offer a brief free Ruby on Rails crash-course at Resala, Masr El Gedida branch God willing.

Thursday, December 21, 2006

Steps in Creating a Rails Application

For those new to Rails, here is a proposed sequence of steps to follow in order to make a Ruby on Rails application:

  1. Use the rails command to generate a skeleton for your web application.
  2. Create a database and its tables using MySQL. Make sure to follow Rails conventions in naming tables and table columns.
  3. Use the scaffold generator to automatically create each model and its controller and views.
  4. Manually code relationships between tables into model files.

You can now go ahead and view your web application in the browser after starting the web server.

You can start shaping up your web application from here. Go back to the controllers and views, make needed modifications then go back and view your application in the browser. Keep modifying the application files till your web application is complete and is shaped like what you have in mind.

The above sequence is merely a proposed sequence. It is specially suitable for new comers to Ruby on Rails. Sure there are alternative paths. For instance, one can start by creating an empty database, and use Ruby on Rails migrations to create the tables. One can also go about writing controllers and views by hand without first using the scaffolding features of Rails.

If you would like to use migrations rather than creating the database tables directly with MySQL, then you can follow this alternative approach:

  1. Command line prompt, rails_apps folder: rails appname
  2. MySQL command line console: create database appname_development;
  3. Generate a migration after going to the appname folder: ruby script/generate migration add_tables
  4. Edit 001_add_tables.rb file to define database tables.
  5. rake migrate
  6. For each model (~table): ruby script/generate ModelName
  7. Define relationships between database tables inside model files (appname/app/models/ModelName)
  8. ruby script/server
  9. Open your browser at: http://127.0.0.1:3000/ModelName+'s'