If you have some experience on programming especially based on linux kind operating systems (Ubuntu, Mac OS X, so on.), you will find Ruby easy to get familiar with and very simple to use. This article is just for those who have some programming knowledge or experience such as Java, C#, VB.NET, C, C++ or even Objective-C, assuming that you are somewhat familiar with the concept of OOP and basic idea of programming language.
Ruby is quite not the same as those legendary language like C or java. It is very interactive and simple. If you are using Mac OS X, you already have Ruby development environment. Most of linux OS also include any necessary development tools. – You can find further information on some other many websites that can be found by googling. (i.e. http://www.ruby-lang.org)
I will let you look up those websites for Ruby installation and set-ups. It is as simple as just typing a couple of lines on Terminal if you are on Linux-based-OS, or even you may not need to install in case it is already installed on your operating system.
Firstly, open a terminal and use ‘rib’ commend to get into the Ruby interpreter. You may find it different from other IDE, in fact, this is not IDE at all. However, this is the easiest way to test your code or try out some code quickly.
Basic operators from other languages work almost the same way.
+ – / * (addition, subtraction, multiplication, division)
** (exponent)
% (remainder)
#null type is called “nil” in Ruby.
There are some basic classes that are useful to know.
Integer – integer type
methods: +, -, /, *, %, **, to_s, to_f
Float – float type (decimal)
methods: +, -, /, *, %, **, to_s, to_i
String – text type
methods: capitalise, reverse, length, upcase, to_i, to_f
To use method with a class, it is simple as the following.
“hello”.capitalize
=> “Hello”
(This is “hello” object of String class and the object used ‘captalize’ method like putting ‘.methodName’ in front of the class object.
*To know more about methods of some classes, just use ‘ri’ commend on Terminal window.

If you have some experience on programming especially based on linux kind operating systems (Ubuntu, Mac OS X, so on.), you will find Ruby easy to get familiar with and very simple to use. This article is just for those who have some programming knowledge or experience such as Java, C#, VB.NET, C, C++ or even Objective-C, assuming that you are somewhat familiar with the concept of OOP and basic idea of programming language.
Ruby is quite not the same as those legendary language like C or java. It is very interactive and simple. If you are using Mac OS X, you already have Ruby development environment. Most of linux OS also include any necessary development tools. – You can find further information on some other many websites that can be found by googling. (i.e. http://www.ruby-lang.org)I will let you look up those websites for Ruby installation and set-ups. It is as simple as just typing a couple of lines on Terminal if you are on Linux-based-OS, or even you may not need to install in case it is already installed on your operating system. Firstly, open a terminal and use ‘rib’ commend to get into the Ruby interpreter. You may find it different from other IDE, in fact, this is not IDE at all. However, this is the easiest way to test your code or try out some code quickly.
Basic operators from other languages work almost the same way. + – / * (addition, subtraction, multiplication, division)** (exponent)% (remainder)
#null type is called “nil” in Ruby.
There are some basic classes that are useful to know. Integer – integer type  methods: +, -, /, *, %, **, to_s, to_fFloat – float type (decimal) methods: +, -, /, *, %, **, to_s, to_iString – text type methods: capitalise, reverse, length, upcase, to_i, to_f
To use method with a class, it is simple as the following. ”hello”.capitalize=> “Hello”(This is “hello” object of String class and the object used ‘captalize’ method like putting ‘.methodName’ in front of the class object.*To know more about methods of some classes, just use ‘ri’ commend on Terminal window.

** For more basic and detailed information, please refer to the website http://www.ruby-lang.org/en/

(There are some tutorials for beginners)

– coming up next: your own methods and classes


Ok, this is very basic stuff (i mean concept.:D ) but also important. Polymorphism provides a way for a subclass (child class) to define its own version of a method defined by its base class (parent class). This is called “method overriding” and is very common concept in OOP (Object Oriented Programming) such as Java.

Let’s see how this concept works within C#. To re-build your current design, you need to understand the modifiers; virtual and override keywords, and their meanings. Overriding methods in C# is a bit different from doing so in Java, however, the main concept of it remains the same.

If a super class (base class) wishes to define a method that may be (or may be not) overridden by a subclass, it must mark the method with the virtual keyword. These methods with the virtual keyword are called virtual methods.

public class ClassName

{

// This method can be overridden by a derived class.

public virtual void VirtualMethodName(int paraInt)

{

}

}

The same rule is applied to a subclass. When a subclass wishes to change the implementation details of a virtual method, it does so using the override keyword.

class Subclass : SuperClass

{

public override void Method1(int intV)

{

….

base.Method1(10);

}

….

}

Unlike Java, you can leverage the default behavior using the base keyword. In this way (the same as the Java overriding concept, but for those who are new OOP with C#), there is no need to completely re-implement the logic behind Method1(), but can reuse and extend the default behavior of the parent class.


Snow Leopard was released by 28th Aug 2009. I have pre-ordered it a couple of days ago, and it was shipped 27th and arrived on 28th. The package was simple with nice Leopard picture on the front cover.

Here is the Installation screen,

OS X 6 Installation folder

OS X 6 Installation folder

Install Mac OS X

Install Mac OS X

And also Utilities for restoring after installation of the new OS X.

Mac OS X Utilities

Mac OS X Utilities

The DVD has a full OS installation package, NOT just upgrade kit. This is pretty good bargain with $29 of price. Apple’s price policy has been a bit high, however, not for this time, not for this one. lol

Snow Leopard package DVD also contains Xcode 3.2 for Snow Leopard which has up-to-date version of the developer packages. You can simply install Xcode 3.2 after installed snow leopard.

Xcode 3.2 packages

Xcode 3.2 packages

Xcode 3.2 for Mac OS X 10.6 Snow Leopard

Xcode 3.2 for Mac OS X 10.6 Snow Leopard

After upgrade OS X 5 to 6 Snow Leopard, the hard drive became about 10GB more space. It is approximately measured since I had to clean up some applications and files before upgrade it but not so sure how much I had got rid of them. Anyway, after some time playing around with Snow leopard, the speed of running or moving around was felt bit faster and much smoother.

Feature that most interests me about Snow Leopard: iCal, Email and Address Book MS Exchange support. Not only for MS Exchange but also other CalDAV and Gmail on iCal. This makes me use the default apps more often and efficiently. By using these you can almost make Mobile Me iPhone Sync for iCal, Address Book and Mail, if you do not want to spend 100 bucks a year, although I like Mobile Me service.

Just in case you have not heard about Snow Leopard (OMG!). Snow Leopard is not a major OS upgrade or significantly new version of OS. Probably not like upgrading from windows XP to Windows Vista or 7 I guess. But definitely improved performance and enhanced other features on Leopard (OS X 10.5.x).

I know it is too early to say anything about pros and cons about Snow Leopard, but it is getting quite interesting and I would also like to know about others getting Apple’s upgraded OS X, Snow Leopard.

–Updated on 29 Aug 2009 1:50 am–

I forgot to mention about some other good features, firstly Expose has got better on performance and also interface. The old version of Expose was bit cumbersome and hassle prone to use but now it is much easier to navigate and notice apps through.




iCal

January 2012
M T W T F S S
« Jan    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Archives

Follow

Get every new post delivered to your Inbox.