Appending Strings to NSString in Objective-C

nsstring appendString concatenation is one of the most commonly-used techniques in modern programming. In most cases, this is accomplished using an addition or concatenation operator. However, you do not do it this way in Objective-C. Strings in Objective-C are handled using the classes NSString and NSMutableString, and require a little more effort to work with on the part of the programmer.

The information presented here is a short description of how to append and concatenate strings in Objective-C; it is not a complete tutorial for the language. Programming in Objective-C requires careful memory management and good practices (particularly if you will be submitting your projects to the iOS or Mac App Stores), which are best learned through a comprehensive tutorial such as Objective-C for Beginners, which teaches application development for OS X and iOS. If you are working exclusively on iOS apps, you can learn the basics of iOS 7 App Development at [Read more…]

Working with ArrayList Collections in Visual Basic .NET string.formatIn Visual Basic .NET, the ArrayList class is used to create an array (or list) of objects. Unlike simple arrays, ArrayLists are designed to have no fixed size – contents can be added or removed while the program is running. Although arrays can be re-dimensioned in VB.NET, they are not built to be used this way. In situations where this is likely to occur often, performance may suffer and it is often preferable to use an ArrayList.

To make full use of the information and examples presented here, a working knowledge of programming in Visual Basic.NET is recommended. Beginners can learn application programming with VB.NET and Microsoft Visual Studio 2013 at It is also possible to work with ArrayList objects in Visual Basic for Applications (VBA), and a very short example of this is shown below. Readers who are new to the concepts of working with VBA in Excel, or unaware of the differences between VBA and VB.NET might care to take a useful course in writing Excel macros using Visual Basic. [Read more…]

String.Format in Visual Basic .NET string.formatThe Strings module in Visual Basic .NET contains many procedures to search and manipulate strings of characters. One of these, String.Format(), creates strings by combining string values with other data types and controlling how each value is displayed. Rather than formatting values individually and then concatenating them, Format() works with a string that specifies insertion points in its text. These insertion points are then replaced with the actual values. Being a string itself, the format string can be loaded from external files and resources, allowing for flexible string handling that can be convenient when working with internationalized and localized applications.

To make full use of the information and examples presented here, a working knowledge of programming in Visual Basic.NET is required. Beginners can learn application programming with VB.NET with Microsoft Visual Studio 2013 at Although the code samples below are written in Visual Basic, String.Format() works just the same in C#. Those who prefer to study C# will find that this C# Tutorial for Beginners is an excellent resource for learning C# programming. [Read more…]

Pascal Programming: An Introduction

pascal programmingPascal is a high-level, procedural programming language that was developed in 1968–1969 and named after the French mathematician Blaise Pascal. It was designed to help teach structured programming to students – encouraging solid programming practices, code clarity, and organizing programs into well-defined blocks. Implementations of Pascal are available on most computer systems, all the way from early mainframes and 8-bit microcomputers to modern 64-bit platforms, and the language is still used to write software.

This is a short introduction to the Pascal language, not a complete tutorial. offer a more practical and comprehensive tutorial that teaches Pascal programming from its fundamentals to object-oriented extensions. [Read more…]

Serializing and Deserializing JSON in C#

json serializer c#Serialization is a programming technique that converts an object in memory to a sequence of bytes. The serialized data is suitable for storage in files and databases, and can be sent to other computer systems across network protocols. In this short tutorial, you will see how to use features built-in to the .NET framework to serialize objects to JavaScript object notation (JSON). JSON stores objects and collections of objects in a human-readable, structured text format, and is commonly used in client/server architectures because of its high level of compatibility across a wide range of client programming languages.
[Read more…]

Fundamentals of MIPS Programming in Assembly Language

mips assembly language programming“Microprocessor without Interlocked Pipeline Stages” (abbreviated MIPS) is a computer processor architecture developed by MIPS Technologies, and is often used when teaching assembly language programming in computer science courses. The design has also been licensed to manufacturers, such as the Sony Corporation for its early PlayStation range of games consoles and handhelds, and can regularly be found embedded in electronic devices.

Although this introduction explains many of the basic concepts, programming in assembly language requires a good knowledge of microprocessor-based systems. Computer Science for Everyone with Java at is an excellent resource for learning the principles of how computers work, and acquiring a basic knowledge of digital electronics, logic, and circuits is always useful before programming in a low-level language like assembly. [Read more…]

Calculating the Size of Data Types in C using Sizeof

for loop cIn the C programming language, and several of the languages based on C, the sizeof operator can be used to calculate how many bytes a data type occupies in memory. This is particularly useful when working with structs and dynamic memory allocation using malloc, or when writing code that is intended to be portable between C compilers on various platforms. Certain data types may be a different size when compiled on different systems, and being able to detect this in your programs can help make the conversion an easier process.

In this explanation of the unary operator sizeof, very few of the other language features are described. Beginners may wish to start by learning the basics of C programming at before reading about the sizeof operator. A working knowledge of how memory is organized in a computer system may also be useful, and Computer Science for Everyone with Java introduces much of the background information that both C and Java programmers need. [Read more…]

How to Make a Plugin for WordPress

how to make a pluginAs both a blogging platform and a site content management system (CMS), WordPress has a rich feature set and a vast array of customization options. But if you need functionality that is not built-in, you can extend the system with plugins from the Official WordPress Plugins Repository, or even write your own. All WordPress plugins are written in PHP, and can be installed through the administration panel.

This is an introduction to writing plugins, and assumes that you are familiar with administering a WordPress system, such as installation, security, and performance. You will also need to have knowledge of PHP and a thorough guide to the PHP programming language can be found at [Read more…]

How to Learn Assembly Language

how to learn assembly languageAssembly language (also known as “assembly” or sometimes “assembler”) is a programming language used to write software that closely corresponds to how a microprocessor actually executes instructions. It is primarily concerned with the activities of a central processing unit (CPU): binary arithmetic, storing values in memory, and jumping (“branching”) to other parts of a program. Although a great deal of knowledge about the computer system is required, assembly language has relatively few commands to memorize.

As it mirrors the architecture of computer systems (from the design of CPUs, to the ways that memory and peripherals are made accessible to the system), familiarity with the components of a computer system will be needed. This information is often given at the start of computer science courses – such as Computer Science for Everyone with Java at In addition, learning binary arithmetic and conversion to and from binary, decimal, and hexadecimal number systems would be extremely useful. [Read more…]

XML Serialization and Deserialization in C#

c# serialize to xmlSerialization is a mechanism for converting an object (such as an instance of a class, or a collection of objects) into a stream of bytes or characters that you can save to a file or database, or even send across the Internet to other systems. When needed, you can deserialize the data – converting it back to a usable object in memory. The .NET framework contains many classes to help with this process, and offers in-built support for XML serialization (serializing an object to an XML data file) through the XmlSerializer class and the System.Xml.Serialization library.

This article provides a brief overview of XML serialization and deserialization in the C# programming language. It assumes that readers have a reasonable knowledge of C# and Microsoft Visual Studio, and so complete beginners would benefit from exploring the fundamentals of C# programming first. Readers who are unfamiliar with XML should learn the basics of XML programming before continuing. This is especially important if intending to use serialization to exchange data with other systems. [Read more…]