Why do so many namespaces start with com
Why we keep seeing namespaces such as com.Apple or org.clojure
This is to maintain uniqueness among namespaces such as described by Oracle.
Companies use their reversed Internet domain name to begin their package names—for example, com.example.mypackage for a package named mypackage created by a programmer at example.com.
Name collisions that occur within a single company need to be handled by convention within that company, perhaps by including the region or the project name after the company name (for example, com.example.region.mypackage).
Packages in the Java language itself begin with java. or javax.
Read the post and the comments. Lots of interesting stuffs regarding functional programming and object oriented programming.
Seriously read the comments too, I learned a lot by doing so ;)
This looks cool, will check it out for a project soon. It powers http://cibox.org/ and it’s in Ruby.
require ‘e’
class App < E
map ‘/’def index
# …
endend
App.run
From Android to iPhone, users everywhere have made it abundantly clear that mobile apps are the future, and when it comes to mobile nothing beats a native experience. Native apps mean we need API’s, and API’s need Authentication. That’s why I’m happy to introduce the solution to your mobile Rails…
Ruby’s Symbols Explained
Explain is a gem which can explain your Ruby code in natural language as shown below which works only with Rubinius.
The github page is at https://github.com/txus/explain.
Check the example below;
class Person
def walk(distance)
@distance += distance
@hunger += 2
end
end
Run explain on the code above
$ explain person.rb
Let’s describe the general attributes and behavior of any Person.
A Person can **walk**, given a specific distance. This is described as follows: its distance will be its distance plus what we previously defined as `distance`. Finally we return its hunger will be its hunger plus the number 2..
Need this for a project of mine. This seems handy if you’re planning to use cloudinary to build a photo storage web application or something.
Way back in mid-2007, when Rails 1.2 was the new hotness and GitHub was still a year away from crawling out of the primordial internet soup, prolific open source contributor Dr Nic wrote an article titled “8 steps for fixing other people’s code”. It offers excellent general advice, but the…