Monday, February 28, 2011

Psychotic Waltz is back!

Please read it here:
Out of the Everflow... the original Psychotic Waltz lineup is back and heading on tour with
Nevermore and Symphony X. February 25 to March 20th, 2011.

Dan Rock: Psychotic Waltz mastermind
Yes, after so many time just checking Psychoticwaltz.com out of real serious curiosity and hoping for a miracle, I finally read that! Yeah, they are touring in Europe with the original lineup. If you have checked this blog, you probably know how crazy I am for PW  that  I even put them in a different category as I think they have created a genre of their own.
Brian McAlpin: The other mastermind



I have reviewed their albums at Amazon here and here. Please check out this band, now they are back I am hoping for a DVD and a new album. A concert down here on the forgotten lands of Brazil is completely "out of mind"...

This is the best news this year so far in the metal genre. Probably the only album I will buy this year considering that I am unemployed.

Saturday, February 19, 2011

Job question and why I think you should use MingW

I had a job interview and they asked me to write a program to read 10 registers with the following fields:

Name, address, phone and age.

And I should print out the two eldest in the list. I could use any language I wanted, then I thought if I chose pure ANSI C would be really painful because I would need to sort these registers using qsort. Then I thought about using C++ and STL, that is really the easiest way to do that fast, and to be honest the shortest and more concise way. The STL supplies me the sort method that can take, a pointer iterator to the first item and one pointer to the last.

When I was there I just forget two important things, when I sort a container I sort it from low to high, as I would override the < operator. And I forgot to implement the constructor.

Anyway I came to home and tried to implement it using DevCpp, which has MingW built in, which is a gcc port for Windows. I think that DevCpp uses a real old version of MingW, but that is no excuse for not compiling STL based code properly. If I use MingW the code below won't compile. I just did what is better for C++ programmers on Windows, I used Visual C++ Express 2008. And it compiles. The copy constructor is a bonus.

Edit: New versions of MingW are quite decent and will compile this code.  Use Qt Creator with MingW bundled instead of Visual C++.

#include "stdafx.h"
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

class Registro {
public:     
     Registro(string& Nome, string& Endereco, string& telefone, int idade );
     Registro(const Registro& reg);
     bool operator<(const Registro& reg);
     string Nome;
     string Endereco;
     string telefone;
     int idade ;
};

Registro::Registro(string& Nome, string& Endereco, string& telefone, int idade )
{
     this->Nome = Nome;
     this->Endereco = Endereco;
     this->telefone = telefone;
     this->idade = idade;                    
}

Registro::Registro(const Registro& reg)
{
    this->Endereco = reg.Endereco;
    this->Nome = reg.Nome;
    this->telefone = reg.telefone;
    this->idade = reg.idade;
}

bool Registro::operator<(const Registro& reg)
{
    if ( this->idade < reg.idade)
        return true;
    return false;
}

int _tmain(int argc, _TCHAR* argv[])
{
    int cnt = 0;
    vector<Registro> regs;
    while ( cnt < 4 )
    {
          string Nome;
          string telefone;
          string end;
          int idade = 0;
         
          cout << "Digite o Nome: " ;
          cin >> Nome;
          cout << endl;

          cout << "Digite o Endereco: " ;
          cin >> end;
          cout << endl;
         
          cout << "Digite o telefone: " ;
          cin >> end;
          cout << endl;         
                             
          cout << "Digite a idade: " ;
          cin >> idade;
          cout << endl;
         
          Registro reg(Nome,end,telefone,idade);
          regs.push_back(reg);        
          cnt++;
    }
    sort(regs.begin(), regs.end());
    cout << "O Mais idoso: " << regs[regs.size()-1].Nome  << endl;
    cout << "O segundo mais idoso: " << regs[ regs.size()-2].Nome << endl;
    return 0;
}

Wednesday, February 02, 2011

Cautiva

Cautiva is a single-man band. It is Jose Traviesso doing everything. Jose is a musician with roots on the classical area, he is an erudite composer and pianist. It happens that he also loves prog rock and technical metal and technical thrash metal. So he created Cautiva, a band that both shares his love for metal and his ability to write complex musical pieces.

You can actually check out his web site  and see that his musical experiences go beyond metal. Anyway, last year he made hard copies of his masterpiece "Human" and I was fortunate to acquire one autographed copy .

If you can picture a mix of King Crimson, Mekong Delta with emphasis in minor harmonic and melodic scales that are common in Spain, you would reach the point. In fact I invite you to dig it, check the links.