Friday, August 26, 2011

Interesting concepts

 Here are some interesting concepts I came across.

1. Testing is a subdivision of Quality Assurance (everybody knows it).

2. Both Testers and Programmers are Developers (this one is new).


3. An Agile Sprint contains a number of User Stories that should be implemented in a period of time, 1-4 weeks (everybody know this).
    Each User Story is implemented and then tested. The programmer doesn't go to the next user story until the previous is not set to "Done" by the tester (hmm...).



Bibliography:
http://my.safaribooksonline.com/book/software-engineering-and-development/software-testing/9780321616944

Thursday, August 25, 2011

"The War of the End of the World" by Mario Vargas Llosa


    Ok, I read "The War of the End of the World"... Strange book..
    It presents a society in the transition between Empire and Republic, and it not an easy transition. 
    The local politicians don't agree with the changes. They lose many of their rights, slavery is no longer accepted, but there is not much anyone can do. So, if no human can change history, conveniently religion steps in.
    The action takes place in Canudos (as the War of Canudos conflict in late 19th-century Brazil) on the lands owned by one of these politicians, the Baron de Canabrava. 
    
    Antonio Conselheiro, a religious fanatic walks and preaches in and around Canudos. He manages to attract many adepts, some of which are thieves or murderers. They all fall into the spell of his stories, being convinced that the Republic is the symbol of the devil.
   Llosa creates profiles for a suite of physically or mentally challenged characters, which surround the Counselor in the battles that follow:
- The Little Blessed One - an orphan that proves his faith by suffering the torments of a sharp chain around his waist;
 - The Lion of Natuba - a severe handicapped that looks and crawls like an animal;
- Maria Quadrado - a woman that kills her child and goes mad;
- Joao Abade - responsible of many murders that he believed will revenge his father's death;
- Joao Grande - a slave child that kills his owner’s sister and becomes an outlaw;
- Pajeu - a blood thirsty criminal;
- The Dwarf - a circus dwarf;
- Father Joaquim - a contested priest;
- Antonio Vilanova - a merchant that works hard to support his family and that takes care of the economy of Canudos during the battle.
- The Near-Sighted Journalist - a journalist that falls into the middle of the battle;
- Galileo Gall - an idealist that believes in science and is against religion;
- Rufino - a local guide that gets killed while trying to revenge the shame of his wife;
- Jurema - Rufino's wife, which gets raped by Gall, survives the war and falls in love with the Near-Sighted Journalist;
- Moreira Cesar - the general of the 7th battalion, that is humiliated and killed in the battle against the Counselor and his followers;
and many others, that Llosa creates for his complex world coming to an end.

    The community that gathers at Canudos, fights the republican armies, using all resources. They win a few times but eventually they are outnumbered and concurred. Evolution is imminent and has a great price in human lives. Only few survive to tell the story.

    To sum up, an interesting book to read. 
    Next on the list is "Conversation in the Cathedral", probably followed by "The Time of the Hero", "The Green House" and "The Feast of the Goat" by the same Mario Vargas Llosa. What made me curious to read more of his work was the stunning difference between "Aunt Julia and the Scriptwriter" and "The War of the End of the World". I want to see more differences :)

Create large files using fsutil

I often needed large files of different sizes. Here is a way to obtain such files easily:

Open command prompt and type: fsutil file createnew c:\250.txt 262144000



This will create a 250 MB file = 262144000 bytes  (250 * 1024 * 1024) .

Other fsutil commands:

Thanks to Zirconium for the tip - http://zyrconium.wordpress.com

Wednesday, August 24, 2011

You do not have permission to read the security descriptor on ..


When you get an error like this: "You do not have permission to read the security descriptor on .." when clicking on the Organization Configuration in Exchange Management Console here is what you can do:

1. Close Exchange Management Console.
2. Go to Start -> Run.
3. Type "control keymgr.dll" (without quotation marks), press Enter.
4. Remove all the existing cached credentials.
5. Reopen Exchange Management Console.


Thursday, August 11, 2011


Function that verifies an email is available in the MSSQL database:


Public Function Database()
Dim con,rs,i
'Opening the ADODB Connection
Set con=createobject("adodb.connection")
'Creating the Recordset object
Set rs=createobject("adodb.recordset")
'Opening the conenction
con.open "provider=sqloledb.1;server=server_ip;uid=sql_user;pwd=password;database=database_name"
'Executing the query against the database opened
rs.open "select*from [database_name].[dbo].[table] where (name like 'test%' or name like 'func') and date>=getdate()-1",con
'Looping through all the values of 1st and 2nd column values
i=0
Do while not rs.eof
'verifying email and attachment are in the database
If (InStr(rs.fields("name"),"test") or InStr(rs.fields("name"),"func")) then
If InStr(rs.Fields("location"),"Administrator/Inbox") or  InStr(rs.Fields("location"),"Administrator/Sent Items"Then
database = true
else
database = false
End If
End If
        rs.Movenext
Loop
wait 5
End Function

Wednesday, August 3, 2011

MySQL useful commands/queries

1. TRIGGER privileges:

In order to assign this privilege to an user you must run this SQL query while you are logged with a user who has permission to GRANT:
                GRANT TRIGGER ON [dbname].* TO '[username]'@'[hostname]'
To Grant Trigger privileges on all databases for user root while this user is connected from any host, you should use this SQL query:
                GRANT TRIGGER ON *.* TO 'root'@'%'

2. UPDATE table information:

UPDATE `database_name`.`table_name` SET `table_field1`='a', `table_field2`='b' WHERE `table_field3`='c';

Useful link: 
- http://www.pantz.org/software/mysql/mysqlcommands.html

Changing SMTP email address on Exchange 2007

   "Frequently, the internal domain name differs from the external domain name. For example, your internal domain name may be domain.local, although your external domain name is domain.com. The domain name system (DNS) MX resource record for your organization references domain.com. Domain.com is the SMTP namespace that you assign to users when you create an e-mail address policy. You must create an accepted domain to match your external domain name."


1. Open Exchange Management Console -> expand Organization Configuration -> click on Hub Transport.
2. Go to Accepted Domains tab -> New Accepted Domain.
3. Go to E-mail Address Policies -> New E-mail Address Policy.

Useful links:
http://technet.microsoft.com/en-us/library/bb124423%28EXCHG.80%29.aspx
http://blogs.technet.com/b/exchange/archive/2006/11/16/3397300.aspx