Category Archives: Personal Project

My second presentation at L’U-B.

Today, I gave my second presentation at the University of Burgundy. I presented following major topics:

  1. The social network
  2. World Languages vs. languages of IT.
  3. New Developments in the world of IT.
  4. Cloud Computing
  5. Questions and Answer.

While my French still needs improvements, I spoke for one and half hours. During the presentation, I particularly stressed the importance of developing programming language unique for each culture, country, and human language. The world of IT as we known is becoming more and Americanized by English as the dominant programming language. While it is good to have a language everyone agrees on, it also poses limitation on human thoughts. During the written process, certain amount of information is lost via the selection process of:

  1. Deciding what is most important
  2. What to store and save; hence, what to omit,
  3. The sequence of storage
  4. Primary actors and actions
  5. The structure of the language.

The limitations of the written language thus pose a barrier to achieve perfect information storage. (See my slides on details.) Of course, the perfect information maybe wholly unnecessary. How to use and analyze the information perhaps carry greater importances.

Anyway, while I am not proposing to fragment the languages of computation, I do think it is necessary to introduce additional thought patterns and schools of thoughts to enrich our lives.

Additional things  I discussed included:

  1. Cloud Surfing – Ability to use the best feature and services from each of the cloud computing providers
  2. Database Cross-Cutting – The ability to leverage community schema. 80% of the common functions, e.g. logging, e-mail, group and policy management are nearly identical across multiple applications. It is much more efficient to extend a community database model than reinventing the wheel again. The community knowledge about the structure of applications is much more intelligent than one person, as well as better acceptance to help the evolution of the data model.

Of course, those ideas are still relatively new. Further refinement is still needed.

2nd presentation with professors of the University of Burgundy.

Christophe, me, Julien, and Nader Mbarek

The presentation is attached.

2nd_IUT_presentation

SSH and Remote Proxy

SSH is very unique. It allows you to establish tunnels, allowing you access to a third machine through a proxy server.

For me, I found 2 types of tunneling very useful.
1. Local Tunneling
2. Remote Tunneling

Type 1. Local Tunneling, usage, you need to access a box which is sitting behind firewall, e.g. a mailserver. You can SSH to a third proxy box and establish a local tunnel to your current machine. Basically, you forward traffic from a local port to another local port which is used for SSH. This routes 9999 (remote) to 5903 (local port) on remote machine 190.120.226.69 (with ssh). Useful for VNC server with Amazon Cloud, for example. Syntax:

$ ssh -L 9999:127.0.0.1:5903 username@proxy_server

Type 2. Remote Gateway, usage, using your laptop (which does not have a static IP address) as webserver for development purpose. To do so, you need to turn on Gateway on the proxying machine (which has a static IP address.) You need to set ‘GatewayPorts yes‘ on the ‘/etc/sshd_config‘ file

GatewayPorts yes

After restarting the sshd daemon on the proxying machine. Now, you can masquerading your laptop as a machine with static IP via gateway proxying.

$ ssh -R 10337:127.0.0.1:4000 username@proxy_server

With that, all http request to the http://proxy_server:10337 is redirected back to your local laptop on port 4000, allowing you to test your app on a laptop without static IP address. Here, 10337 is the proxying port. And, 4000 is your local port for the development environment. This is particularly useful for testing Facebook type application.

Here are so good articles,

http://articles.techrepublic.com.com/5100-10878_11-5779944.html?tag=nl.e011

http://toic.org/2009/01/18/reverse-ssh-port-forwarding/

SyntaxHighlighter Plugin


This shows how to use the SyntaxHighlighter Plugin.
1st, Java

function java_foo()
{
  if (counter <=10)
    return;
}

2nd, now Ruby

class Salesforce::SfBase < ActiveRecord::Base
  self.abstract_class = true
  def self.login(user, pass, token)
    params = {:adapter => "activesalesforce",
              :url => "https://login.salesforce.com/services/Soap/u/19.0",
              :username => user,
              :password => pass + token
    }
    self.establish_connection(params)
  end
end

To do it: first add the following HTML scripts:

<script type="text/javascript" src="js/shCore.js"></script>
<script type="text/javascript" src="css/shBrushJScript.js"></script>
<link href="css/shCore.css" rel="stylesheet" type="text/css" />
<link type="text/css" rel="Stylesheet" href="/styles/shThemeMidnight.css"/>

Add code into
[lang]
your code.
[/lang]

Finally, add

<script type="text/javascript">
     SyntaxHighlighter.all()
</script>

Project Bordeaux has been open-sourced

I would like to make a new announcement. I have just open-sourced:
Project Bordeaux – A simple Content Management System that is
integrated with Facebook Groups. With this you have a pre-built
Facebook Canvas application that works runs right-out-of-the-box.

It works as follows:
1. The Facebook Groups’ admin are also the administrators for Project
Bordeaux’s application. (You can rename it whatever by creating a new
app on Facebook.)
2. Group Members can post a new listing. Then the Group Administrator
can either ‘approve’ or ‘reject’. Of course, if you change the
setting, new listing can go directly into ‘public’ mode. Once, a
listing is approved, the listing owner will be notified by e-mail.
3. Listing owner can make the listing ‘private’.
4. After certain number of days, the listing will expire, via Job
Server. The listing owner can resubmit the listing for approval by
group admin.
5. Ability to upload photos (goes directly to your photo album – under
‘appname’) and attach files, e.g. word, excel
6. Ability to export and download your listings in an Excel file.
7. Message the listing owner via Facebook Email.

All in all, this platform encompasses Web App + Job Server + Email
notification. It will be a good learning app for people new to
Facebooker and/or RubyOnRails platform.

Screen shots: http://appfactory.are4.us/#ProjectBordeaux

Source Code: http://github.com/raygao/bordeaux

Upgrading rails 2.2.2 to rails 2.3.5

Today, I upgrade my dev and staging environment from Rails 2.2.2 to rails 2.3.5

The steps are:

$ sudo gem update rails

$ sudo gem update

$ <go into the project folder>

$ rake rails:update   <this updates several js files.>

$ <rename application.rb file to application_controller.rb>

$ sudo gem install system_timer

$ script/plugin install git://github.com/rails/irs_process_scripts.git

This is according to Tadatoshi’s blog

However, I found that changing the environment.rb file, from 2.2.2 to 2.3.5 unnecessary. In fact, it caused a problem with tunnlr plugin.

RAILS_GEM_VERSION = ’2.2.2′ unless defined? RAILS_GEM_VERSION

Additional, the socket for mysql was changed in the process by the gem. Therefore it was necessary to create a new symbolic link.

$ ln -s /tmp/mysql.sock /opt/local/var/run/mysql5/mysql.sock

As long as both rails 2.2.2 and rails 2.3.5 gem exist on the same machine, you can run both type of applications.

Rail spikes says there are 10 cool things about Rails 2.3.x