Operator ‘==’ and ‘!=’ cannot be applied to operands of type KeyValuePair error

KeyValue

KeyValue

KeyValuePair is a struct, not a class. It means that it does not define a custom == and != operators and they are not included in the predefined list of value types that can use it.

A best practice could be to take advantage of the default(KeyValuePair) value. In fact, it is possible to use LINQ for queryng a dictionary and just using the Equals() method defined in the abstract class ValueType.


            IDictionary<string, string> directory = new Dictionary<string, string>()
            {
                {"Alice Artz", "940-283-1298"},
                {"Bill Bland", "940-237-3827"},
                {"Carla Careful", "940-237-1983"}
            };

            KeyValuePair<string, string> pair; 
            pair = new KeyValuePair<string, string>("Man", "222-111-1212");
            directory.Add(pair);
            
            var defaultValue = default(KeyValuePair<string, string>);
            var item = directory.FirstOrDefault(x => x.Key == "Man");
            if (!item.Equals(defaultValue))
            {
                Console.WriteLine("Well, no default value this time!");
            }

25 years ago Sir Tim Berners-Lee invented the Web. Which were the competitors? Why the web won?

web-17be2f144637eb54f93735131c7d09d5d6c7904b-s900-c85Before the Web became the most used Hypermedia in the world there has always been need of a non-sequential way to consume the information. Under-standing the history of the Hypermedia, from the futuristic project of Memex by Vanner Bush, going through the Xanadu hypertext, is an important step to under-stand the evolution of the concept behind the Hypertext. Furthermore it will be critically explained the differences between the most famous systems that during the beginning of the 90s could have become the benchmark as hypermedia system. It will be evaluated which features allowed the Web to become the actual standard. With all the information gathered it will be possible to trace a possible scenario for the future of the hypermedia.

1 Introduction
Hypertext has a long and rich history behind it, and despite it was named with its proper name just in the middle of the 60s, something strongly related to the Hyper-media was already present in the Vannevar Bush’s essay named “As We May Think” published in “The Atlantic” in the 1945.

2 Story
It seems to be clear that what we have today it is the result of the work of those visionaries that laid the basis of the modern hypertext systems. In the next sections will be showed briefly a recap of the major aspects of the Hypertext history.

2.1 Memex
In “As We May Think” the American technologist and scientist Vannevar Bush in-troduces “Memex”, an analogic proto-hypertext system with a mechanical storage system widely regarded as the precursor of the personal computer and Hypertext[1].
Bush suggested that the use of Memex would have created a new professional figure: “the trailblazers” a person specialized in tracing new paths or trails association in great mass of existing information.
In his essay “As We May Think” Bush shows the impressive description of a work session with Memex, similar to that of a search on the internet, with almost fifty years in advance[2].

2.2 NLS
The on Line System (NLS), inspired by Memex, was a software system designed by Douglas Engelbart and considered the first example of groupware explicitly dedi-cated to the support for cooperative work[3].
The purpose of NLS was to simplify the cooperation between scientists and professionals on solutions of complex problems. In fact for this purpose NLS introduced a rich set of mechanisms for the information sharing. But NLS was innovative for other reasons, it introduced a series of concepts intended to acquire a great importance in modern computers.
One of these feature was the journal, it was a means of information sharing that used associative memory and links similar to those of modern hypertext. It was designed as an electronic version of a journal and composed by a base of permanent data that constituted a set of published articles, to which users could access for the consultation. The NLS facilitated the organization and tracking of items through a system of indexes, catalogues and cross-references. Users used the e-mail system integrated NLS to send contributions to the journal[4].

2.3 Xanadu
Ted Nelson coined the word Hypertext in 1965. Xanadu project was the first project of hypertext. It was started in 1960, the basic idea of Xanadu was to have a repository containing everything that has been produced by anyone creating a universal hypertext.[5] Nelson strongly believes that everything has to be intertwingled and must be on line. In this way an user could highlight words, accessing to more information, without having to read and understand the text in sequential order[4].
Ted Nelson was creating an innovative way to explore the information providing the reader with an intuitive access to a number of insights, directly from the page of consultation. Practically Nelson’s Xanadu project aimed at the time to realize the utopian project of Memex, it was the first concrete attempt to implement an open structure modifiable by the user that included an apparatus of hypertexts supported by an electronic editing system[6].

2.4 Other Relevant Hypermedia Works
HyperCard is a hypertext software that includes a simple programming language marketed by Apple Computer in 1987, it became very popular because apple decid-ed to embed it in every Macintosh sold[4].
The application closely resembled a database, since it was able to record infor-mation, but unlike traditional databases HyperCard was a hypertext system based on concepts graphics, very flexible and very easy to modify. In addition, it contains the programming language HyperTalk, simple but powerful, to manipulate data and graphic interfaces[7].

3 Hypermedia
Hypermedia is a term, inherited from hypertext; for Hypermedia system we define a platform that incorporates a collection of heterogeneous information, such as graphics, audio, video and text connected together in a non-sequential way[8].

3.1 Microcosm
The Microcosm development started in 1989 by the department of Electronic and Computer Science at University of Southampton. Microcosm is a research project of an open hypermedia architecture which provides a storage system and navigation through a large amount of information. Microcosm handles and saves all the information about links, anchor and node component data, and as a result of the capability to separate the link data from the document data, Microcosm can be classified as “Open Hypermedia System”[9].

3.2 Hyper-G
Hyper-G was the hypermedia system developed and proposed by the Graz University of Technology. It was used the experience in the field of the Computer Aided Instruction Systems in order to develop it. Hyper-G is a distributed Hypermedia system which utilizes the client-server paradigm and that provides both access control and data model. It differs from the other hypermedia system in that it is session based and that approach ensures to maintain the state of connections to servers[8].

3.3 The Web
The World Wide Web was developed by Tim Berners-Lee in 1989 and before to become a de facto standards it received both criticisms and good evaluations by the scientific world.
In the Tim Berners-Lee vision the Web should be a system where the sharing of information should have been easy, allowing people to work together. The system had to help the user to connect to each document online. In fact, the main feature was to allow everyone to create links to any document[10].
Its flexibility and the easy way to be accessed made the Web the modern hyper-text standard.

3.4 Comparison
There are several reasons for the overwhelming success of the Web compared to Microcosm and Hyper-G. Firstly the World Wide Web is ease to use, allowing anyone to be connected, in fact it provides anybody who wants to build and publish a web page to do it easily. This was strongly in contrast with the functions provided by the other two systems which, in the early stage of development, were local systems. Secondly the Web was thought to be a public domain products, whereas for both Micro-cosm and Hyper-G were not clear which parts were supposed to be free for use[10][11].
Despite the implementation of the Web of a simple linking model leads to incon-sistent and broken links, its simplicity could be considered a major strength. Furthermore, the Web has been provided with a simple linking model embedded in the code, whereas Microcosm and Hyper-g supported more kind of link models using database in order to store them[12].
Finally another economical reason for the success of the Web is that it was developed at CERN, that unlike the other two candidates that was developed by universi-ties. It obviously advices that the possibility to be financed by CERN was at the time higher respect the possibility of an university[10][13].

3.5 Future
Probably next stage in the hypermedia future will be the development of an enhanced version of the Web, in order to transform the World Wide Web in an environment where the published documents (HTML pages, files, images, etc) are associated with information and data (metadata) that specify the semantic context in a format suitable for the querying and the automatic interpretation.
With the interpretation of the content of the documents that the Semantic Web requires, will be possible much more advanced research of current, based on the docu-ment for keywords, and other specialist tasks, such as building networks of relation-ships and connections between documents[14].
The most important idea suggested by Bush in his work was the associative indexing, basically each element can be reached through the selection of another element, today with the linked data and the Conceptual Hypermedia could be possible to achieve that was the essential characteristic of the Memex process[1].

4 Conclusion
Tim Berners-Lee, the inventor of the World Wide Web, theorized in 2001 the creation of a “Semantic Web”, defining it as a Web in which we will focus on the computer interpretation of the information. After more than ten years, the futuristic vision of Berners-Lee, although still far from a complete realization, pervades more and more the Web as we know it, and aims to be one of the most important lines of develop-ment for the future, thanks even to the Open Data technologies.

References



[1] V. Bush, “As We May Think,” Atl. Mon., no. 176, pp. 101–108, 1945.

[2] M. K. Buckland, “Emanuel Goldberg, electronic document retrieval, and Vannevar Bush’s Memex,” J. Am. Soc. Inf. Sci., vol. 43, no. 4, pp. 284–294, 1992.

[3] D. Engelbart, “A History of Personal Workstations,” A. Goldberg, Ed. New York, NY, USA: ACM, 1988, pp. 185–248.

[4] J. Nielsen, Hypertext and Hypermedia. Academic Press, 1990.

[5] T. H. Nelson, Literary machines 93.1. Mindful Press, 1993.

[6] N. Woodhead, Hypertext and Hypermedia: Theory and Applications. Sigma Press, 1991.

[7] R. R. Nelson, “Using HyperCard for content analysis,” Lit. Linguist. Comput., vol. 7, no. 3, pp. 185–93, 1992.

[8] D. Lowe and W. Hall, Hypermedia and the Web: an Engineering Approach. 1999.

[9] W. Hall, H. Davis, and G. Hutchings, Rethinking Hypermedia: The Microcosm Approach. Springer US, 1996.

[10] T. Berners-Lee and M. Fischetti, Weaving the Web: The Past, Present and Future of the World Wide Web by Its Inventor. Orion Business, 1999.

[11] R. T. Fielding and R. N. Taylor, “Principled design of the modern Web architecture,” ACM Trans. Internet Technol., vol. 2, no. 2, pp. 115–150, 2002.

[12] D. E. Millard, “Hypermedia interoperability: Navigating the information continuum,” University of Southampton, 2000.

[13] B. Hassan, N. Gibbins, and S. Qader, “Analysis for the Overwhelming Success of the Web Compared to Microcosm and Hyper-G Systems,” Int. J. Multidiscip. Curr. Res., vol. 3, no. Sept/Oct, pp. 988–991, 2015.

[14] L. Carr, W. Hall, S. Bechhofer, and C. Goble, “Conceptual Linking: Ontology-based Open Hypermedia,” Proc. 10th Int. Conf. World Wide Web, pp. 334–342, 2001.

Which is the purpose of ISO Standards? What does a quality standard tell us? ISO9000 and TickItPlus uncovered.

500px-ISO_9001_in_Tsukiji-738972

The Purpose of ISO Standards

ISO (The International Organization for Standardization) is the most important organization for the setting of Technical standard. It is composed by a large number of governments and private companies.
ISO 9000, is the standard that provides a set of standardized requirements for a quality management system.[1]

ISO 9001 is a framework containing general standards that can be used to provide quality management system standards in order to develop software standards. It provides a set of guidelines including the essential procedures to pursue high quality products, in fact according with Sommerville the ISO 9001 standard does not provide or specify precise rules on how a specific process has to be led, rather it is a framework that prescribes what has to be implemented in order to guarantee high level of quality. In addiction there is no way to ensure that a certificate company is able to produce a quality product. What the ISO 9000 aims for is to assure that a certain company has implemented the framework following their procedures.[3]

TickitPlus the standard for IT project

ISO 9001 is a complete standards framework developed around the need to provide quality management systems standards. What that suggests is the need of a set of standards more specific for the IT service management field.

TickItplus was born from the need to create a certification scheme able to be both suitable for the It world and capable to rule the software development. In fact TickItplus is an upgrade of ISO 9001, it means that it is not possible implement TickItplus without not be ISO 9001 compliant, in fact TickItplus make sure that all the stakeholders have a fully understanding of what has to be provided in the IT sector.
Before to TickItplus there was TickIt a certification scheme built on ISO 9000 and able to accommodate the needs in software development.

Tickit was particularly appreciated for the way in which examiners carry on the assessments and for the different reading of the ISO 9001 offering a diverse key to understand the technology sector. [2]
A key feature of TickItplus is its flexibility in audits, in fact ISO 9001 audit result can only lead to a pass or a fail result, whereas TickItplus provides capability levels and several process attributes complying with ISO/IEC 15504-2.[4]

Tickitplus provide the chance to include in the set of the certification program also two relevant standards as ISO/IEC 20000-1: IT Service Management that coming from BS 15000 that is in turn mainly developed on the basis of ITIL (Information Technology Infrastructure Library) framework and ISO/IEC 27001: Information Security Management Systems which is a comprehensive framework that guarantee the management of the security in the IT area.[5]

References

[1] K. Schwalbe, Information Technology Project Management, vol. 1. 2014.
[2] Project Management Institute, A Guide to the Project Management Body of Knowledge – PMBOK Guide. 2013.
[3] I. Sommerville, Software Engineering. 2010.
[4] F. J. Pino, M. T. Baldassarre, M. Piattini, and G. Visaggio, “Harmonizing maturity levels from CMMI-DEV and ISO/IEC 15504,” J. Softw. Maint. Evol. Res. Pract., vol. 22, no. 4, pp. 279–296, 2010.
[5] R. Bamford and W. J. Deibler, Iso 9001: 2000 for Software and Systems Providers: An Engineering Approach. CRC Press, 2003.

Quality in Software development – 8 Quality standards your software should never be lacking

software-quality8 Quality Standards

It is a crucial task managing and maintain quality in software because every single user has to feel satisfied and he should be led to maintain the loyalty to the brand. Furthermore, maintaining high quality standards allow the developers to keep under control the number of flaws to replace.

1. Performance
Any kind of application must be operative, after the deploying of the first release it has to work properly, being reactive and fast, returning all the data correctly. The visualization of the data has to be checked on the most popular browsers fitting on every kind of screen resolution and size. It will be provided a good user experience thanks to an accurate use of advanced responsive web design techniques. Finally the search has to be effective and accurate returning a coherent results.

2. Availability
In the case of a web appliction, for instance, it must be possible to reach the application at the known address every time the user wants to join the platform. In fact typing the specific “URI”, in the address bar, the application has to be always available, without exceptions or errors, showing the correct page. This is an important characteristic in order to assure a correct indexing by search engines through proper links.

3. Response Time
Another important performance aspect in the capability of the system is to respond to the request in an adequate time both for the navigation through the page and for what concern the access to the services exposed by the system. This means that the system must react rapidly for every user request without slowing down the activities that the user is executing on the platform.

4. Security
The application shall guarantee a trustfully environment implementing security to the platform avoiding that the traffic between the user and the server is altered and that it is made accessible by third persons. Users must have the perception to navigate in a secure environment able to avoid the spreading of virus and malware on the user machine and to the application server that, in that way, could allow the access at non authorized subject able to damage or get possess of sensitive data.

5. Understandability
Any application shall be strongly understandable providing several characteristics aimed to achieve that user’s goal. The page content has to be ordered following a clear and organic conceptual model, as more conform as possible to the cognitive model of the user. It is important to identify all the entities that characterize the domain sorting them in different area properly. It will be easily achieved using proper label to the object and grouping class in order to establish relationship between the page’s elements.

6. Robustness
Applications shall be robust, it will allow the users to utilize all the content that it will provide without generate errors. Robustness depends on how many errors occur from an unexpected behavior of the user after that they learnt how to use the system, how many grave they are and how is it possible to identify and correct or prevent it.

7. Learnability
Users will be provided of an application which shall be easy to learn, a generic user that approaches to the application for the first time must be able to learn easily and rapidly how it works in order to use the content that it offers with a reasonable level of skill, all the step that make up the entire workflow has to be easy to remember even though the system will not be used for a long time.

8. Usability
An important attribute of quality in software engineering is the usability. All applications shall be user friendly, it should allow the user to accomplish every functionality in the easiest way possible, it has to be achieved avoiding redundant elements not required for the specific task. Any graphic and functional element not needed for the task will not be implemented.

8 common features your web application must, should, could implement in order to be kept abreast.

A common way to create understanding among stakeholders on the importance that they should place on the delivery of each requirement is the use of MoSCoW method
This meta-analysis will be carried out through using three different level of priority.
It will be used “Must” for all the requirement considered mandatory, “Should” for the requirement not mandatory but nice to have and “Could” for all those requirement optional that having enough time could be possible to provide.

1. Membership plans
The main feature that it has been identified to be the core of the nowadays business and that the system must provide to the user is the section which shows the membership plans (monthly, bimestrial, trimestral or annually). The system will give read-only access to the web pages to non-registered users in order to advertise and show the multitude of data present on the platform with the scope of pushing the user to get a membership.

2. Advertisement
The web application must be furnished of some specific areas intended to contain advertising banners that allow the analysts to track and generate statistics and to manage all the information about the user preference through an online panel.

3. Corporate values
Many researches advise to give fundamental importance to the corporate values. So in the main page of the system must position in the main menu those categories respectively as first and second entry. Later, it could be possible creating a different membership option concerning the business based on these genres.

4. Language diversity
In order to accomplish any future market expansion the system should provide the selection of the preferred language for the navigation menu and a preference for the specific product language, where it is available for the product.

5. User friendly search
The system must implement a user friendly search engine able to find products based on common criteria, (genre, age, new items, date, price reduced, and so on…). In addiction It should be capable to provide related results both based on the user search history and on the user related interests.

6. Payments
Both booking procedure and payment procedures must be processed online allowing users to use online payments methods using credit or debit cards. It should be a benefit having the chance to implement the Paypal payment method using the API exposed by the Paypal platform. It could allow users to pay their subscription rapidly and safely. It has been thought that the system could provide with the chance to dispose bank transfers or to pay with the most popular gift card.

7. Feedbacks and reviews
Feedback and review must be a fundamental part of the platform because they are essential reference points for the usability of the platform. User will advise each other on several product aspects, like for instance giving some tips and tricks related to the use, rather than advice a better one. It could leverage the social aspect of the platform involving users in a community such a forum, in which they can talk about hide functionality, parallel story of the items and sharing tip and tricks on the use of them.

8. Referral track system
The system must be provided of a referral track system that equips users with a unique “URI” in order to promote personal campaign. Referral programs are based on word of mouth (WOM) reemerged nowadays as important and spontaneous marketing phenomenon. In fact it uses users as vehicles for promoting the worthiness and the quality of the platform. In that way an user has every reason in being active part of a referral campaign because bringing in a new user would reflect automatically on his membership.
In conclusion referral programs can allow to reduce heavily the number of banner on the application to create a credible and trustfully environment.

Const vs Static vs Readonly vs Static Readonly in C#

2p4i

Const

A variable declared as const (constant) must be assigned a value at declaration, and this value may not then change at a later time.


public const string FixedString = "YourFixedString ";  

The value in a const variable is what is called a compile-time value, and is immutable (which means it does not change over the life of the program).

Only primitive or “built-in” C# types (e.g. int, string, double) are allowed to be declared const.

You want to use const when you have a variable whose value will not change, ever, during the time your application is being used.

Further, any variable declared as const will also, implicitly, be declared static.

So, what about the static one?

Static

A static member (variable, method, etc) belongs to the type of an object rather than to an instance of that type. Hence, if we declare for instance:


public class AClass  
{
    public static string AMethod() { ... }
}

We must call this method like this:

var result = AClass.AMethod();  

It is NOT possible to call it like this:

var AClass = new AClass();  
var result = AClass.AMethod(); //It is not going to compile

Now there is only one keyword left to define: readonly.

Readonly

A readonly field is one where assignment to that field can only occur as part of the declaration of the class or in a constructor.

public class TestClass  
{
    public readonly string FixedString = "YourFixedString "; 

    public TestClass()
    {
        FixedString = "DifferentString";
    }

    public void TestMethod ()
    {
        FixedString = "NewString";//It is not going to compile
    }
}

This means that a readonly variable can have different values for different constructors in the same class.

Static Readonly

So, now it is possible to list some properties of a static readonly variable.

– It cannot be changed outside of its declaration or containing class’s constructor (due to readonly).
– It is part of the type, not part of an instance of that type (due to static).

At first glance this seems to be like to a constant field, since a constant can only be given a value at its declaration and cannot have that value changed anywhere else, nevertheless the difference lies in the details.

In fact, a const variable is not a reference to anything; it is literal value “burned” into the code (using a constant is the true definition of hard coding a value). A “static readonly” variable is a reference, and consequently a lookup is performed any time this variable is accessed. However, as often happens, the compiler is smarter than you and any supposed performance difference will probably be negated.

But there’s another, more subtle difference that we should be aware of. If a const variable exists in Assembly A and is used in Assembly B, when Assembly A gets recompiled with a new value for the const variable Assembly B will still have the previous value until it is also recompiled.

MVC Attribute ValidateAntiForgeryToken explaned

services-MVCMVC’s anti-forgery support writes a unique value to an HTTP-only cookie and when the page is submitted, if the cookie value doesn’t match the form value an error is raised.

The main feature it has been thought to prevent cross site request forgeries. That it could be a form from another site that posts to your site in an attempt to submit hidden content using an authenticated user’s credentials. The attack involves tricking the logged in user into submitting a form.

To use it, decorate the action method or controller with the ValidateAntiForgeryToken attribute


        [HttpPost]
        [ValidateAntiForgeryToken]
        public ActionResult Edit(Mouse mouse)
        {
            if (ModelState.IsValid)
            {
                db.Entry(mouse).State = EntityState.Modified;
                db.SaveChanges();
                return RedirectToAction("Index");
            }
            return View(mouse);
        }

then place a call to @Html.AntiForgeryToken() in the forms posting to the method.


.....

<h2>Edit</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Mouse</legend>

        @Html.HiddenFor(model => model.ID)

.....

The feature doesn’t avoid any other type of data forgery or tampering based attacks.

How to show modal dialog in SharePoint 2013 using Javascript Client Side Object Model CSOM

uploaddocumentdialog2In this Article I would be able to teach you some tips and tricks with regards to SharePoint 2013 modal dialogs. I hope these examples will save you some time and help keep your custom components’ user experience consistent with the Sharepoint 2013 Client Object Model using Javascript SharePoint.
The first thing that I wanted to point out is the SP.UI.ModalDialog.RefreshPage method.
If dialog requires updating information on the parent page, which you may not have access to, you can use this method to force a page refresh if the dialog returns a success value.
An example of this is when your dialog results in column values being updated on a SP list view.
Below the Custom Javascript Function:


function OpenDialog() {

	var url = window.location.href;
	//Catch the Query String
	var queryString = url.substring( document.URL.indexOf('?') + 1 );
    var application_page_url = "";
	
	//if you want you could pass a parameter 
    var param01 = queryString;
	
	//This is the url with the related parameters
	application_page_url = 'ExampleFolder.Project.XYZ/CustomPage.aspx?' + param01;
    
    var options = {
        url: SP.Utilities.Utility.getLayoutsPageUrl(application_page_url),
        
        allowMaximize: false,
        showMaximized: false,
        showClose: true,
        width: 380,
        height: 280,
		top: 240,
        // Frequently developers create a delegate which refer an external method;
		// but I prefer handle it inside my method;	
		
        dialogReturnValueCallback: Function.createDelegate(null, function (result, returnValue) {
        if (result == SP.UI.DialogResult.OK) {
            if (returnValue == null) {
                SP.UI.Notify.addNotification('Operation successful');
                SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
            }
            else {
				location.href = urlCompleto;
            }
        }
    })
	
    };

    SP.UI.ModalDialog.showModalDialog(options);
}

Reference: https://msdn.microsoft.com/en-us/library/ff410259(v=office.14).aspx

Immediate provisioning of lists and items in Sharepoint 2013 through the use of PowerShell Scripts

macrovs-sharepoint-powershell-script-2013-backup-deleteMicrosoft’s PowerShell is a powerful command line interface and scripting language. It was designed for .NET objects, and it finds its highest expression used with SharePoint.

You can use script editors with code-completion features to help quickly find commands and attributes with debugging features to check syntax and run your codes and scripts.

In this article We would focus on the SharePoint Script application, particularly the provisioning of lists and items by PowerShell.

If You haven’t added our site columns yet, this is the right moment for doing it whit PowerShell; if You are sure to have done correctly your MyPersonalListSitecolumn.xml You are ready to install it.

ImportSiteColumns $siteUrl '..\SiteColumns\MyListSiteColumns.xml' ..\Logs\$logFile; 

With this snippet of code we can create our custom list in a particularly site collection:

	
$siteUrl = “http://contoso.com:2000”;
$web = Get-SPWeb ($siteUrl + '/');
$listName = "MyPersonalList"; 

        Write-Host;
	
	Write-Host 'Creating "MyPersonalList" Custom List...';
	
	Write-Progress -Activity 'Working...' -Status 'Please wait...';
	Start-Sleep $startSleepSeconds;
				
	CreateList $web $listName ..\Logs\$logFile; 

Before we have to add both our site column to the List and to the view ( Obliviusly we have already added our site column fields in the properly xml file):

		#Region AddFieldToList
			AddSiteColumnToList $web $listName "CustomFieldOne" ..\Logs\$logFile;
			AddSiteColumnToList $web $listName "CustomFieldTwo" ..\Logs\$logFile;
		#EndRegion
			
		#Region AddFieldToView
			AddFieldToView $web $listName "All Items" " CustomFieldOne " ..\Logs\$logFile;
			AddFieldToView $web $listName "All Items" " CustomFieldTwo " ..\Logs\$logFile;
		#EndRegion 

Now, only if you have declared the populate list function you can invoice it:

PopulateList $web $listName ..\Logs\$logFile; 

Populate list previously declared:


function PopulateList($web, $listName, [string] $sLog) {
	Write-Host;
	try {
		$spList = $web.Lists[$listName];
		
       
		#Create a new item
		$newItem = $spList.Items.Add();
        $spList.Update();

		#Add properties to this list item
        $newItem["Title"] = "Title1";
        $newItem["CustomFieldOne"]= 1;
        $newItem["CustomFieldOne"] = "One";
		
		#Update the item and save it to the list
		$newItem.Update();	

		#Create a new item
		$newItem = $spList.Items.Add();
        $spList.Update();

		#Add properties to this list item
        $newItem["Title"] = "Title2";
        $newItem["CustomFieldOne"]= 2;
        $newItem["CustomFieldOne"] = "Two";
      
		#Update the item and save it to the list
		$newItem.Update();	

		. . .
            . . .

		#Create a new item
		$newItem = $spList.Items.Add();
        $spList.Update();

		#Add properties to this list item
        $newItem["Title"] = "TitleN";
        $newItem["CustomFieldN"]= N;
        $newItem["CustomFieldN"] = "En";
		      
		#Update the item and save it to the list
		$newItem.Update();			
			
		}
		catch 
                {
		Write-Host;
		Write-Host $_.Exception.Message -ForegroundColor Red;
		Write-Host;
        	logError $sLog $_.Exception.Message;
        	logFinish $sLog;
		
		Pause('Press any key to continue...');
		Break;
		} 	
} 

Now let’s see both in your site contents and in your site columns the expected result. Enjoy!

Choosing the appropriate Recovery Model for a Microsoft SQL Server Database

Identifying Recovery Goals and Requirements

To select the best suited recovery model for a database, consider the recovery goals and requirements for the database. Answering the following questions can help you determine the availability requirements and the sensitivity to data loss.

 

Recovery model Benefits Work loss exposure Recover to point in time?
Simple Permits high-performance bulk copy operations.Reclaims log space to keep space requirements small. Changes since the most recent database or differential backup must be redone. Can recover to the end of any backup. Then changes must be redone.
Full No work is lost due to a lost or damaged data file.Can recover to an arbitrary point in time (for example, prior to application or user error). Normally none.If the log is damaged, changes since the most recent log backup must be redone. Can recover to any point in time.
Bulk-Logged Permits high-performance bulk copy operations.Minimal log space is used by bulk operations. If the log is damaged, or bulk operations occurred since the most recent log backup, changes since that last backup must be redone.Otherwise, no work is lost. Can recover to the end of any backup. Then changes must be redone.

When to Use the Simple Recovery Model

Use the simple recovery model if the following are all true:

Point of failure recovery is unnecessary. If the database is lost or damaged, you are willing to lose all the updates between a failure and the previous backup.
You are willing to risk losing some data in the log.
You do not want to back up and restore the transaction log, preferring to rely exclusively on full and differential backups.

For more information, see Backup Under the Simple Recovery Model.

When to Use the Full Recovery Model

Use the full recovery model and, optionally, also the bulk-logged recovery model if any one of the following is true:
You must be able to recover all the data.

If the database contains multiple filegroups, and you want piecemeal restore of read/write secondary filegroups and, optionally, read-only filegroups.

You must be able to recover to the point of failure.
You want to be able to restore individual pages.
You are willing to incur the administrative costs of transaction log backups.

For more information, see Backup Under the Full Recovery Model.

When to Use the Bulk-Logged Recovery Model

The bulk-logged recovery model is intended strictly as an adjunct to the full recovery model. We recommend that you use it only during periods in which you are running large-scale bulk operations, and in which you do not require point-in-time recovery of the database.

Is the database subject to periodic bulk operations on the database?

Under this recovery model, most bulk operations are only minimally logged. If you use the full recovery model, you can switch temporarily to the bulk-logged recovery model before you perform such bulk operations. For information about what operations are minimally logged under the bulk-logged recovery model, see Operations That Can Be Minimally Logged.

Generally, the bulk-logged recovery model resembles the full recovery model, except that it minimally logs most bulk operations. A transaction log backup captures the log and, also, the results of any minimally logged operations that have completed since the last backup. This can make the log backups very large. Therefore, the bulk-logged recovery model is intended only for use during bulk operations that allow for minimal logging. We recommend that you use the full recovery model the rest of the time. As soon as a set of bulk operations finishes, we recommend that you immediately switch back to the full recovery model.

 

For more information about the bulk-logged recovery model, including its restrictions, see Backup Under the Bulk-Logged Recovery Model.
For more information about the restore operations that are supported by the different recovery models, see Restore and Recovery Overview (SQL Server).

References: http://technet.microsoft.com/en-us/library/aa173531%28v=sql.80%29.aspx