Monthly Archives: October 2007

Don't Outsource, Hire a Robot!

I have been reading articles about outsourcing for some time and I have always thought to myself, someday, a robot or program will be doing the job of people. I think that we are getting closer and closer to the day when peoples jobs will not be so complicated that a machine can not learn to do the same thing as a person.

For example, I have been reading and reading about how important marketing is and I even went as far as to hire a few markeitng people but guess what? It did not work out… I thought, wouldn't it be simpler to just tell a program to do this work to the exact specification I need, rather than communicate this to a human who might mess it up or might not do as good and complete a job as a program.

There are some things that humans can do that machines are not too good at, but there are also things that computers are really good at that people are not. I think though with the proper software and teaching, a program can learn to do a job as well as most people, I am in the process of creating a marketing program, called Matt.

My Quest For Another Language – Part 2

It's between Ruby or Python.

I hear all the buzz about Ruby, but performance is… lackluster (see shootout Python vs. Ruby). Even with the latest versions of Ruby 1.9.0 and Pyro Python, the fact remains, Python is a lot faster than Ruby. There's another discussion as well about the differences between the two languages (Ruby vs. Python).

I also like the fact there's no "end" required in Python, I get tired of looking at code with a bunch of "ends" as well as looking at code with a bunch of dollar signs $ and curly braces{}.

So asside from syntax of the two languages it's going to come down to language features and performance. Since Python is faster what about the language features? Well I am not computer sciencey enough to make the list algorithms or OO correctness or which language is most LISP like or has SmallTalk influences.

I still don't know… Let's see what will I be doing with my language?

  • Robotics & AI – Performance (Java, C, or something very fast for low level processing)
  • MetaProgramming & Code Generation (I need a templating engine)
  • Data Collection Scripts & Web Automation (All languages can do this rather well)
  • Database Access (All languages can talk to MySQL with the right driver)
  • No web programming, I still like PHP enough for this, but who knows.

Two more options come to mind. JRuby & Jython.

If I can wrap all of my Java classes in a JRuby or Jython script, then basically I have the performance I need with a nice syntax, but then again I can also use Groovy for this.

Options are:

Ruby, Python, JRuby, Jython, Groovy…

 

My Quest For Another Language – Part 1

Some Initial Thoughts…

I have been searching for a language for a few years now. I think it's because of all the ones I start working with, there are just things I don't like about them… Java, PHP, Ruby, Python to start with (I am not going to C, or C++). So I have been looking at some other ones, like Common LISP and Haskell. Here's a link to all languages from WikiPedia.

I think the language that I will like will  be multi-paradigmed (functional, object oriented, and interpreted). Some candidates for that are: Common LISP, Objective Caml, Perl, Python, PHP, Ruby, Groovy, Jython, JRuby. If syntax is a consideration, I would eliminate PHP and Perl. If performance was a consideration I would liminate Groovy, Jython, and JRuby. This leaves me Common LISP, Objective Caml, Python and Ruby. But of these only Python and Ruby are interpreted.

To be continued…

 

We live in an unscientific age.

Every day it seems that I am reminded about how unscientific we are today. I remember reading a talk by Richard Feynman on the very same subject. It's not so much that things in general are unscientific but that things are often unscientific for no reason at all and more imporantly, things that should be scientific are made unscientific.

While I don't want to talk about politics on this blog, I find the "Global Warming" theory itself very unscientific. I think that it's a valid hypothesis, however experiments can be show to support two conclusions, which makes it not very scientific… It seems that everyone has forgotten the law of convervation of energy and the 2nd law of thermodynamics.

In politics people are very emotional and this of course is unscientific but what bothers me, is that people call on reason and science to support the vauge and unproven. It's because the lack of understanding and lack of scientific practice that people get away with this, and the majority of people believe things stated as scientific when they are just opinion or hypothesis…

But I don't want science in everything. How pretty a flower is or how much you like or disklike some artwork, is not scientific, though cases have been made to show that, I don't think it's all that important to apply science to everything.

PHP vs. Ruby

I have been searching for the answer to this for a long time and still do not quite have an answer for this … So to help me decide I set out to write two simple useful programs to find my Google Rank, one written in PHP and the other written in Ruby.

They are both about the same length (~25 lines of code). The Ruby code does not use functions it uses methods (def …) and Ruby does not use curly braces. I did have to cast a number to a string in Ruby via to_s. I also had to import 2 packages in Ruby: 'net/http' and  'uri' which I did not have to do in PHP.

The syntax in Ruby was just a tad easier to read, but  semi-colons and curly braces were about the same as all of the  'end' words I had to use.

So to this point I don't see what the BUZZ is all about. I think it's Rails related…. But as to the language itself, I am not convinced it's really anything new and exciting.

I have heard about DSL, i.e. DOMAIN SPECIFIC LANGUAGES and Ruby and how they are a perfect match. But to mee this just seems like it's still about the syntax. If  Icreate a class in both languages called WebSite, then created two methods one called fetchHome, and another called getGoogleRank, then I would write code like this, website.fetchHome, and website.getGoogleRank (excluding the . for Ruby and the -> from PHP). So again, I don't get it…