VBA Programming - Simple Code for Forms

Posted by admin on February 28th, 2010 under Development  •  No Comments

Knowledge of Visual Basic Application (VBA) programming can be very useful when dealing with Microsoft Access. You should keep in mind that VBA is event-driven and very good when dealing with customized user forms and dialog boxes. Do not worry if you have no experience with VBA, as it is easy to learn and perhaps the best way to start is by trying out some basic code.

You can actually start by writing code to improve the efficiency of a form that you have already created or are in the process of creating. The goal of a good form is to allow users to enter data quickly and with little or no errors. This can be achieved by using VBA, so let us try a simple operation.

You should begin by creating a new form in the design view. You will notice that all your objects and controls (text and combo boxes, command buttons etc) have events associated with them (click and change events etc). All these can be modified with code.

Select the control you want to modify by clicking it once and choose to display its properties. Click on the property you want to change and click again on the “(…)” that you will see next to it. Now click on Code Builder and the VBA Editor will be displayed.

Now you can write code that will affect the way the form works. You can even write a function that will notify the user of any errors detected in the form and then saves the information in a record once the error has been corrected.

There are many free VBA tutorials available on the internet which will allow you to try out the example suggested above. Sometimes the best way to learn is by practical experimentation.

An Introduction to Javascript

Posted by admin on February 28th, 2010 under Development  •  No Comments

JavaScript (JS) is primarily targeted at relieving the “boredom” caused by static HTML pages. JS is a dynamic language which can respond to user actions. Therefore clicking actions and placing the mouse on top of an object can be made to cause reactions.

A “behavior” is the title given to how an object will react. Behaviors can be triggered by “events”, such as double clicking or clicking an object. The rollover effects, drop down menus etc are all results of behaviors as a result of an event taking place. These effects serve to make your webpage look dynamic and less boring.

You should keep in mind that JS is a Client Side programming language. This essentially means that the code is sent to the user’s machine to be compiled and executed. This execution is done by the browser and sometimes the JavaScript function is turned off by the user or by default. This presents developers with a few problems. All the hard work you put into the JS code is non-existent if the browser does not execute the code. There is also the problem that any validation code you use will also be of no use. However, the latter can be countered by having a server side programming language double checking whatever input your page receives, but this does mean more work for the programmer.

JS did have a bad reputation at one point where it was used by malicious sources to cause havoc on users’ computers. This is the reason why many users kept JS switched off on their browsers. However with newer browsers like Google Chrome and Apple Safari handling JS faster and better, users are now placing more confidence in pages which use JavaScript.

Programming Concepts - Variables

Posted by admin on February 21st, 2010 under Development  •  No Comments

Variables can are found in all programming languages. These are designed to be used to store values which can then be manipulated by the program. In a very basic way, variables can be thought of as containers of differing types. The differentiation comes with the fact that each variable has to be associated with a data type, i.e. Integer, Character, String etc.

Variables are used in programming for various reasons. They are commonly used to capture data from the user and also to store temporary values. For example, when the program requests a user to enter their name, the resulting input is stored in a variable which could be named “username”. This variable can then be accessed by other parts of the code for its data whenever required. At the end of the program or on its next run it will not hold the previous data that was entered as it will have new data entered by another user (hence the term variable).

In most languages, variables can be defined as Global or Local. Global variables can be called up anywhere in the program, so they can be defined only once. To continue with the previous example, if “username” was a global variable, another variable with the same name cannot be defined. However, local variables can be defined with the same name in different parts of the program within Procedures, Functions etc. For example, a variable named “temp” can exist in many procedures if it is only defined locally i.e. within that procedure.

Variables can be defined anywhere in the program except in the case of a Strongly Typed programming language. In this instance, the variable has to be defined before it is used.

A Good Programming Language for Beginners

Posted by admin on February 20th, 2010 under Development  •  No Comments

Getting into programming is a very interesting experience. This is because writing computer programs require you to alter the way you would normally think. Programming is all about breaking down a problem into smaller pieces and sticking to the rules. The former helps you solve the task you have at hand and the latter will give you a smoothly functioning piece of code.

C is a good programming language to begin with. Not only will it teach you many of the fundamentals in programming, it is also a very powerful language which is very much in use today. C programming will help you understand Variables, Looping, Control Structure and Program Structure among other things. These are the fundamental concepts that exist in all programming languages. Once you have experience in understanding these, you will be able to use that knowledge to easily come to grips with another programming language.

C will also help you learn complex concepts like Object Oriented Programming, Inheritance and Function Overloading. But those can be left out until you are confident with the elementary concepts of the language.

One of the important things you will learn is to architect your solutions using C. This means that you will, in due course, learn how a problem can be broken down into several parts, and how those parts can be broken down further and so on until you have mapped out exactly what components need to be developed in order for the total problem to be solved. This is commonly called thinking like a programmer.

Programming Concepts: Data Types

Posted by admin on February 14th, 2010 under Development  •  No Comments

Programming involves a very methodical approach to problem solving. In this process, there are rules that help maintain the order and legibility of the code. Some of these rules involve Data Types.

These data types help to segregate and limit the type of data that is held or processed by the code. For example, if you needed to record a user’s credit card number, it would be relevant to use a data type that stores numbers only. This would increase efficiency and validation in the code. Although programming languages have data types that are peculiar to them, they are all based on certain broad principles that we will discuss here. The standard data types are as follows:

Numbers - In programming, numbers are stored based on their length and as such they are generally divided into the Short, Long, Float and Double types. The first two refer to smaller and larger integer ranges while the latter refers to smaller and larger floating point ranges.

Characters and Strings - Again these types are based on memory requirements. Character types can record only one character at a time, whereas String types can take in large sequences of characters. Their use is typically governed by the type of operation that is required as well the amount of memory available.

Pointers - As their name suggests, these are references used to locate data in the computer’s memory. Use of pointers requires a deeper understanding of the workings of the code and computer memory. Used often with Arrays, pointers are very useful for tracking and sorting data.

This is a very basic description of data types. As you delve into programming, you will gain a better understanding of the varied types that stem from these basic types.

Advantages of using Visual Basic for Applications over Macros

Posted by admin on February 13th, 2010 under Development  •  No Comments

Microsoft Access allows users to easily create and manipulate databases. While it has many useful features, there are times when you have to customize certain tasks due to functionality requirements. Due to this, many users resort to using Macros.

Macros are a set of stored commands. Usually repetitive tasks can be locked down in macros and associated with a command button. Clicking this button will execute those commands. This is a simple way to achieve your goals, but there is an efficient way that will benefit you more in the long run that involves using Visual Basic for Application (VBA).

Speed - Macros are fast when the number of commands is less in number. VBA is more adept at handling longer and more complex instructions efficiently. Speed is an important factor because clients are not very forgiving when they realize they have a slow piece of software in their hands.

Functionality - The number of actions are limited when it comes to macros. VBA has superior functionality, which includes cross-application support. For example, in a case where you prepare an invoice, the customer’s name can be picked from a table, cross referenced with Outlook’s address book and an email sent all without any prompting from the user.

Control - When activated, macros have to run their course. They are more like batch files in that sense. VBA code will give you control over each step and can be customized for individual users.
In conclusion, VBA is not the solution for every problem but it can make many tasks easier and more efficient. A combination of Macros and VBA used prudently, will yield the best results.

Top “rookie” Open Source Languages

Posted by admin on February 4th, 2010 under Development  •  No Comments

Black Duck, a software-license code analysis vendor constantly evaluates open source software. Recently their list of top “rookie” open source software was released.

The winner was Google’s Android OS and closely followed by a variety of gaming, cloud computing and healthcare based software. The list is mainly compiled to be a fun event rather than provide any official rankings. The top ten were chosen from a base of 19,000 projects.

1. Live Android - This offering from Google allows users to run the OS on their PCs without affecting any files. It a method by which users can try the OS without buying an Android phone.

2. Open Health Natural Language Processing - IBM and the Mayo Clinic came together for this one, which gives Medical Clinics and Researchers access to documents such as clinical notes, pathology reports, etc.

3. Mobile Browser Definition File - This software enables developers to design accurate content for mobile phones and devices.
4. Redis (REmote Dictionary Server) - Supporting fast access to a dataset, this application is an advanced key store database. It also is capable of scaling up to cloud levels.

5. Samsher - Allows creation of striking effects from a variety of audio formats without the use of a sequencer. Filter sweeps, phasing, flanging, delay and distortion are some of the effects on offer.

6. AbiCloud - This tool gives users the capacity for scaling, managing, automatic and immediate provisioning of servers, storage, networks and virtual network devices, as well as applications.

7. Transdroid - A remote torrent client for the Android OS.

8. Rainmeter - Designed to measure performance indicators in a PC. E.g., CPU load, memory load, free disk space, etc.

9. TweetCraft - For the World of Warcraft addicts, this add-on enables Tweeting without leaving the game.

10. Native Client - Enables running of x86 native code in Web applications. The idea is to ensure safety, OS portability and browser neutrality.

Go - Google’s own programming language

Posted by admin on February 4th, 2010 under Development  •  No Comments

When it comes to products from Google, users have come to expect groundbreaking innovative revelations. Go, a programming language designed by Google, has not made that mark quite yet.

At the very basic level, Go is a remake of object-oriented C, but it does have some interesting features. Designed primarily with Google programmers in mind, it is capable of massive scaling and is optimized for multi-core processors that handle parallel multi-tasks. Although it has not been used in any of Google’s commercial applications so far, it is expected to do so in the near future. Go features an extremely fast compiler and code that runs as fast as C. It is not a language for beginners and its learning curve can be put on par with that of Java. The object-oriented language also features functions such as true closures and reflection.

Go began life in 2007 as a “group 20%” project. Projects that lie outside usual responsibilities of a Google employee are titled “group 20%” projects. Employees can devote 20 percent of their time to work on these if they wish to do so. Full development of Go only began in 2008.

Go gained the most market share in 2009 and in response to this, was awarded TIOBE’s Programming Language of the Year 2009. The incredible rise that Go has experienced may have a lot to do with hype, but then again Google products have more success stories than failures. The development and updates will of course dictate how far and powerful the language becomes. For now, it is an exciting new language, which is fun to experiment with and holds many possibilities.

Restrictions on the iPhone Application Development

Posted by admin on January 31st, 2010 under Development  •  No Comments

If you are interested in developing applications for the Apple iPhone there are few things you should keep in mind. The underlying theme is that Apple does things the way it does, because it works for them. This does not necessarily mean that the Apple’s processes are the best or that they are flexible enough to suit your needs.

One of the key rules in iPhone apps is that only one application can run at any given time. This means that if the user is playing a game or entering data into an app, the app will have to quit if the user decides to answer an incoming call. This is something you will have to keep in mind while designing your app. This sort of problem can be circumvented by moving the active app to the background while the user takes the call. This approach is easily done using operating systems such as Symbian. Unfortunately, for various reasons, the iPhone and the iPod Touch do not allow multi-tasking apps.

The Sale of apps is another area where Apple does not make exceptions. All apps must be sold through the Apple Store. There is no other outlet and the apps entry is carefully regulated by a monitoring team. This goes towards ensuring quality and security, which benefits Apple, not being a bad thing at all. However, the team also decides on how long the app stays in the store, which is done by considering various factors.

Since all apps run only if they have the necessary digital certificates in place, it offers Apple a quick and easy way to terminate an app when conflicts arise. Even if a customer is using your app, it will stop working on their iPhone or iPod Touch if Apple revokes your certificate.

There are many other issues as well which you need to be aware of before you get into app development. However, the aim of this article is not to deter you from developing apps, rather it is to inform you so that you know the limitations that exist so that you can work within and around them to produce a successful app.

Learn a Programming Language

Posted by admin on January 31st, 2010 under Development  •  No Comments

The view that most people have of programming is that code equals Greek. This assumption occurs because these languages cannot be understood by people. Even after studying it for some time, it still does not make sense. What is aggravating is that code written in English is extremely irritating for people who cannot make head or tail of it.

However, once the rules are explained, the code will start to make sense. Consider programming a problem-solving game, like Sudoku for instance. Once you know how to do something, the code will start to make sense.

Programming is all about rules, and once you know these rules you can go about creating anything you like. This factor causes most people to take an avid interest in programming, because it allows you to have your own approach to a problem. For example, if you want to design a simple DVD cataloguing system for your movies, you can do so with a little bit of programming knowledge. How you approach the problem and how someone else does it will be completely different. The challenge and fun is to keep going at it until you are satisfied with its efficiency and effectiveness.

Programming is also a great way to stimulate your brain. By mulling over a problem and trying to solve it, you effectively train your brain to approach daily situations in a composed and precise manner, enabling you to dissect the problem and solve it bit-by-bit just as you would a programming problem.

So go ahead and try it; there is a multitude of programming languages out there with millions of free tutorials on how to go about it. Who knows, you might even turn it into a career.