Tuesday 23 April 2013

Can progress be faster?

What did people living a century ago have as an idea of the future?
At that time, the light bulb hadn't been invented yet, large Helium balloons ruled the skies, and telegraph lines were the only method of long distance communication.
No one back then, even the futuristic minds would never have imagined what the world would look like a century later. From computers, to supersonic jets...from the internet to heart surgery, from sending robots to Mars and mapping the human genome...
But what does the future look like to us now? Is it possible to even take a guess for a hundred years later? what about a thousand?
There are very promising short term developments in the areas of science, medicine, computing and engineering. But since the first always precedes the latter three, I will focus on science.
In the next fifty years, the world energy problem will be solved. Commercial nuclear fusion reactors and renewable energy sources would power the the world. Nanotechnology will enable us to manufacture materials with new and interesting properties, from more efficient solar cells to more efficient drug delivery systems, to supercomputers. With a sustainable electricity source, electric vehicles will replace current petroleum cars and planes and rockets will be run on electricity or directly by nuclear power. These are all very short term goals, already on the verge of coming true in the next fifty years.
But progress is simply not being made fast enough. Breakthroughs are done by science, but scientists only form a very small ratio of careers in the 21st century. With sufficient funding and human resources, the 50 year dream can be achieved in less than 10 years. This is an issue a first world country should address...
But what about second and third world countries? Full of people still stuck with the ideology of their ancestors, held back by religious and cultural obstacles? Those brainwashed against rational thinking...
The reason I'm bringing this up, is because third world countries contribute the most to the current human population...and we should look for ways to harvest the scientific minds that are not flourishing, simply because of environmental factors...
Ok, Lio out...I'll finish it later :)

Sunday 21 April 2013

Monday 15 April 2013

USYD - INFO 2120 - SQL Challenge #3 Solution

1- select count(distinct original_language_id) from film

2- select film_id,title,replacement_cost from film
    where replacement_cost between 10 and 20
    order by replacement_cost,title

3- select count(*) from film
    where extract(year from CURRENT_DATE)-release_year <= 10

4- select film_id,title,trunc(length/60,0) as hours, mod(length,60) as mins
   from film where rating='R'
   order by length desc

5- select trunc(355.0/113.0,2), trunc(355.0/113.0,3), trunc(355.0/113.0,4)

6- select film_id,title, length, rating  from film
    where (length>120 and rating='R')
              or (length<60 and rating='PG')
    order by title

7- select actor.first_name, actor.last_name from actor, film_actor, film
     where film.title ='AMERICAN CIRCUS'
                and actor.actor_id=film_actor.actor_id
                and film.film_id=film_actor.film_id
     order by last_name asc

8- Select f.film_id,f.title,f.release_year
    From film f, film_category fc,category c
    Where f.film_id=fc.film_id
         and c.category_id=fc.category_id
         and f.rating='R'
         and c.name='Action'
   Order by f.title

9- select f.title
   from actor a, film_actor fa, film f
   where a.first_name = 'FRED'
       and a.last_name = 'COSTNER'
       and a.actor_id = fa.actor_id
       and fa.film_id = f.film_id
       and (f.special_features like '%Commentaries%'
       or f.special_features like '%Behind the Scenes%')
   order by f.title;

10- select c.category_id, c.name AS category, pa.name as parent
      from category c inner join category pa on pa.category_id = c.parent_cat
      order by c.name

Tuesday 2 April 2013

USYD - INFO 2120 - SQL Challenge #2 Solution


1- select count(*) from film where length >180

2- select count(*) from film where language_id <> original_language_id

3- select title, release_year,rental_rate from film where rating='PG' and rental_rate<1.00

4- select count(*) from film where description like '%Mad Scientist%'

5- select * from language order by name desc

6- select first_name,last_name from actor where nationality='AU' 

                                                         order by last_name, first_name

7- select name from category where parent_cat IS NULL order by name

8- select count(*) from film_actor where film_id=(

                                    select film_id from film where title='VELVET TERMINATOR')

9- select title,release_year from film 

     where 
     rating='R' and special_features like '%Deleted Scenes%' order by title

10- create view ActionMovies as
      select F.film_id as filmID, F.title,F.release_year as year
      from film F, film_category FC, category C
      where 

            F.film_id=FC.film_id and
            FC.category_id= C.category_id and
            C.category_id=(
                                     select category_id from category where name='Action'

             )
            order by year desc