Monday, August 30, 2010

SQL Server role and manual admin

I had to create a fresh instance of database for work and had to assign roles. However, I didn't want to use the "click, click, click" method but rather like to type on the query window.

NOTE: This is to be done after you've created a Database and I won't go into details as to how to create a Database or how to add a user to the database.

I retrieve info from MSDN TechNetabout the database roles and are as such.










































Database-level role nameDescription
db_ownerMembers of the db_owner fixed database role can perform all configuration and maintenance activities on the database, and can also drop the database.
db_securityadminMembers of the db_securityadmin fixed database role can modify role membership and manage permissions. Adding principals to this role could enable unintended privilege escalation.
db_accessadminMembers of the db_accessadmin fixed database role can add or remove access to the database for Windows logins, Windows groups, and SQL Server logins.
db_backupoperatorMembers of the db_backupoperator fixed database role can back up the database.
db_ddladminMembers of the db_ddladmin fixed database role can run any Data Definition Language (DDL) command in a database.
db_datawriterMembers of the db_datawriter fixed database role can add, delete, or change data in all user tables.
db_datareaderMembers of the db_datareader fixed database role can read all data from all user tables.
db_denydatawriterMembers of the db_denydatawriter fixed database role cannot add, modify, or delete any data in the user tables within a database.
db_denydatareaderMembers of the db_denydatareader fixed database role cannot read any data in the user tables within a database.

Wednesday, August 25, 2010

hMailServer

We experienced some issues with the IIS SMTP server recently at my work. The following is a description and may you say shameless promotion to a free email server for team at Redmond.

hMailServer is a free e-mail server for Microsoft Windows. It's used by Internet service providers, companies, governments, schools and enthusiasts in all parts of the world.

It supports the common e-mail protocols (IMAP, SMTP and POP3) and can easily be integrated with many existing web mail systems. It has flexible score-based spam protection and can attach to your virus scanner to scan all incoming and outgoing email.

http://www.hmailserver.com/index.php?page=functionality

Saturday, August 21, 2010

IE Tester

I know how web developers dislike the browser from Redmond, however, there is a simple tester that can be downloaded and basically allows you to test how your page renders in Internet Explorer.

Click here -> IE Tester

Saturday, August 7, 2010

Light musing - deep thoughts

“It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood, who strives valiantly; who errs and comes short again and again; because there is not effort without error and shortcomings; but who does actually strive to do the deed; who knows the great enthusiasm, the great devotion, who spends himself in a worthy cause, who at the best knows in the end the triumph of high achievement and who at the worst, if he fails, at least he fails while daring greatly. So that his place shall never be with those cold and timid souls who know neither victory nor defeat.”
-- Theodore Roosevelt, 26th President of the U.S of A

Friday, July 23, 2010

Javascript validate date - native

If somehow you are trying to validate dates that involves 2 drop downs and the values in the drop down are set, you can do the following.

function validateDate(dateToCheck, selectedDay)
{
var totalMonthCount = 12;
var i = 1;
var isValid = true;

var monthToCheck = parseInt(dateToCheck.getMonth());
var yearToCheck = parseInt(dateToCheck.getFullYear());

if(selectedDay > 28)
{
if(monthToCheck == 2)
{
if(yearToCheck%4 == 0)
{
if(selectedDay > 29)
{
isValid = false;
}
}
else
{
isValid = false;
}
}

if((monthToCheck == 4) || (monthToCheck == 6) || (monthToCheck == 9) || (monthToCheck == 11))
{
if(selectedDay > 30)
{
isValid = false;
}
}
}

return isValid;
}

Mobile web development issues

Show-Hide display
To show-hide a loading screen, you would have to ensure that javascript does an unload on the body tag.

In it, you would want to hide (css display = 'none') for the loading screen section. I've used DIVs for the loading screen section.

HTML links & runat="server"
You will have to ensure that the "href" attribute contains "javascript:;" in the event that you intend to add the runat="server" attribute to your HTML links.

Thursday, July 22, 2010

Software Development - Project Managers

This post is a rant. If you don't like a rant, I suggest skipping this.

I am intruiged at the fact that IT Project Managers will allow untested software to be released to the world.

I am beginning to feel that in the corporate world, software developers are the most unappreciated people and also I am having the inkling that project managers are not operating at effective levels.

According to wikipedia, project management is the discipline of planning, organizing, and managing resources to bring about the successful completion of specific project goals and objectives.

And if a software developer is a resource to the project, my argument is, does this mean that the resource is not being managed properly? Does this than equate to the fact that the project manager is not performing their role to a sufficient and acceptable level?

Yes, sufficient and acceptable is subjective, however, when a Software Development project is over cost, delivered past the deliverable date, who is to blame?
From experience, the blame falls squarely at the feet of the developer. The word around the water cooler is, "so and so is doing a bad job, he's not delivering the project". However, my question is, is the developer solely to be blamed for the ludicrious time-line and deliverable date set by the Project Manager?

My question than is, who set the time-line?

Who spoke to the client and made the promise to the client that at a certain date, the project is going to be delivered?

Do they understand the intricacies of software development?

Was testing done prior to release?

Does the project manager understand that the computer is nothing but a dumb terminal that has to be told in specific fine minute details to perform a certain task?