Monday, September 15, 2008

How Windows OS Consumes Your System's Memory

One of the many concerns of anyone buying a computer is the system memory size, especially if its running a delicate operating system like Windows (and Vista for that matter!). When I bought my HP 530, dual core, 80GB, 512MB-RAM, the first problem I kept battling with is that of managing the little RAM I have, to run the OS. Sometimes I find it very difficult to browse the net, as the system moves slowly, reluctantly and sometimes hangs off! When I could not contain the nuisance, I let go of it, through securing third party applications that could speed up my PC.

In this post, Microsoft Windows Vista's staff Mark Russinovish gave a clear picture of how Windows utilizes your memory while running its processes. Happy reading!

Friday, September 12, 2008

The Long Break - A Review

The Long Break!

The long break I took was purely on accident and coincidence. I have been overloaded with job and personal commitments. That is life for you. However, now that I resumed fully, there is the need for us to look back at the pending projects in the blog. I wish to apologised to readers for my long silence and absence. Lets look at the projects one by one:

The Database Project

This project is almost 90% completion. I have obtained about 20 of the School’s files for data input into the database. All the related forms for data input had been designed, including queries and reports templates. I posted a sizeable number of the 20 files collected, and Godwilling, may finish posting the rest by this weekend. There is no specific date for commissioning the project, I only let the School authorities aware of it. What remains are just finish up, or rather putting finishing touches to the database.

I equally wish to write a complete manual in Hausa language for the proposed users of the database. Also, a visit to the school recently revealed that the School’s computer is in order. Though the machine is running Windows XP, the office program is 2007. So there is little problem with regards to porting the application. This is just a little update, more are on the way.

My Python Lessons

The Python Programming language I started learning some 5 months ago seems to snatch my entire periods, especially these days. The book, Learning Python, written by the famous Python programmer, Mark Lutz, is very interesting. I am presently in chapter 18 – Modules. The python language is simple, flexible and easy to port to different platforms. After a journey through the different chapters of the book, I was able to cover enough, if not everything about elementary programming in the language. To mention a few, I finished the lessons on data types or Objects – Numbers, Strings, Lists, Dictionary, Tuples and Files (open). I equally of recent, covered the different Python Statements and Expressions, Functions and Scope, and presently studying Modules, the fundamentals of all.

Within this period of my absence here, I discovered other python stuff that are directly related to the language, like the numeric extensions called NumPy, and other capabilities of the language with regards to processing numbers, image processing and how the python language can be ported to the Mobile phone as a platform for programming standalone applications. It is indeed a very interesting experience.

After Learning Python, I hope to reach out to other books written by the same author, like Python Programming, where he detailed python’s capabilities in application programming. Other books to looked at includes Dive into Python, and Python Programming for the Absolute Beginner.

In all, my little experience with Python makes me grow in love with the language, and I have finally made up my mind that Python has come to stay with me, FOREVER!

Thursday, March 20, 2008

Update on the Access Database Project

The last time I posted something concerning the Database Project was when I discuss on the general organisation of the project, in its entirety! By then, the whole project was in the design stage. But now, God willing, a lot of things are on ground; including the entire database.

I have designed all the related tables, created queries that will go through them, design reports that will assist in obtaining relevant data from the tables, and finally, each and every section of the database that requires data entry have been gifted with a simple form for the data entry job. A more detailed explanation is provided below:

1. Tables: There are four sections that made up the database, entirely. The Students Records Register contains all the relevant data fields in the table, including a little information about the parents/guardians. Then comes the Staff Records Register, which is a table containing relevant fields about each and every staff of the school; whether a teacher or a non-academic staff. There is also a table for the financial records of the School. This table includes both the income and the expenditure aspects of the school. I call it Finance Records. The last table contains a list of all account codes representing income or expenditure and the nature of both. This is the Account Codes Table.

2. Queries:
Using the Design Query tool in Access, I designed some query samples based on the little data I entered as a test, and it worked fine. I have a query template for each and every table designed.

3. Reports: I also designed a sample report for data contained in the finance table, especially. However, I decided to use my query template in designing the forms. This assisted me in no small major. Though such reports are subject to the data available in the tables, they are handy and can be tweaked around to make some changes.

4. Forms: I have a form for data entry for all the tables. For some tables (like the income and expenditure), I used the query mode to create a data entry form for them. But in some other cases, like that of the Students Records Register, I used the raw table for the form design.

Pending Issues

Before I proceed with the real live-data-entry, I would like to make some changes to the background of some of these objects created. I need to tweak the properties of all the tables data types; setting validation and making some defaults fields enhancement. And since almost all the forms are simple in nature, I need to retouch them, change the layout and arrangement of the forms. Likewise the report templates created. I need to make some changes. In the final analysis, will want to look at macros and what activity I need them to carry out. I also want to create a user entry and a very good switchboard to enhance user friendly interface.

Keep checking the entries!


Friday, February 22, 2008

How Python Runs Programs

Chapter 2


How Python Runs Programs


The Python interpreter runs all the code written in Python. The compilation process in Python is in two phases; when Python codes are written using any text editor available, it can be compiled through the Windows command line/prompt. The Python Interpreter then compile these source codes to byte codes, a low-level language in which the computer can understand, before execution. The Python Virtual Machine (PVM), which is the python runtime environment, then executes these byte codes for the program output.


Source Codes

Byte Codes

Python Virtual Machine (PVM)


Python runs programs immediately they are executed into byte codes, unlike other compiled languages like C and C++ which make room for a recompilation exercise before the execution. The code compilation/execution cycle in Python is therefore straight forward and the most dynamic. For it give room for easy and fast development.


Other Implementation Alternatives


The explanations above suites the Cpython implementation, that is the standard implementation of the Python language. It is the common and the official Python Implementation, which compiled languages like C and C++ deploy. However, other implementations of code execution in Python abound; there is the Jython (or Java Python), a Java specific version of python for the Java developers, who adopt it as a scripting language in applets and java servelets. There is equally the IronPython, which is Windows specific and is used for .NET and C# language developments. With the exception of Cpython above, all other implementations of the Python language seems to have a more specific compilation and execution procedures different from that of the Cpython.


Other execution models of the Python language are Just-in-time Compiler and Shedding C++ Translator. The chapter closed with a brief about "Frozen Binaries", the packaging scheme for all Python coded programs.

Thursday, February 21, 2008

A Simple Database Project Using Office Access 2007

A local Nursery/Primary school is in dire need of a small database that will take care of their piling flat files folders around, and as a friend of the school, I took the daunting task, though silently. The purpose is to give the school management a “practical” surprise with the database, using Microsoft Office Access 2007. I am aware of the sleek and powerful features of the Office 2007 programs Microsoft has released some few months ago. So I choose Access, and am sure it will deliver. This project is very important to the school with regards to proper records keeping. The school boasts of 200 students that attends lectures/lessons at different hours of the day, throughout the week, with the exclusion of Thursdays and Fridays. There are eight teachers around, with a Headmaster and a Committee that oversees the administration of the school.

After a careful look at the project, I came up with a proposal on how to go about the entire project. But first and foremost, everything, as usual, revolves around the six major Objects of a good database management system. These are:

1. Tables (where all the data are to be stored);

2. Queries (form tools that will assist in fetching data using different formats);

3. Forms (the forms assist in inputting data into the tables, and querying such tables in times of need);

4. Reports (a better way of getting the data out of the database for decision making – by printing, viewing etc);

5. Macros (macros are the simplest ways of giving the application order, in order to carry out some recurring events or functions);

6. Modules

The nature of the database should include the following:

1. All the six major objects of a database;

2. Customisation of all forms (both input and query forms) for a good user interface;

3. User account management;

4. Data Security, including backups;

5. Data Analysis features (with regards to income and expenditure, accounting-wise).

The structure of the school management (with regards to admission, recruiting teachers, payment of registration fees, salaries and other income/expenditure) have been observed and I have the following with regards to this:

1. A student register (from tables to input/query forms);

2. Income register (including forms for fees and other income);

3. Personnel Register (for teachers and other support staff of the school);

4. Expenditure register (for all the expenses the school made);

5. A simple General Ledger, for financial discipline and analysis.

The project looks simple but it has a lot in terms of time and technical resource needs. After all, Access has been a very sophisticated database tool, unlike a simple word processing program like Office Word. Let me see whether in the next 30 days I can deliver. The progress shall always be reported here, as usual. Keep a date with this project.

Cheerio!

Wednesday, February 20, 2008

Starting With Python 2.5

The popular open source programming language, Python, has been making the news with its efficient techniques and reusable codes. For the past 15years after its inception, more than 1million developers have either start or switched to Python. There are many books of Python of course in my custody, but would prefer to start with that of Mark Lutz, a famous developer and teacher of the language for more than fifteen years.

I have downloaded the Python IDE and Command shell already from the Python Website. After reading the installation instruction, I unbundled it on to my system and very soon, the tutorial will start.

One thing with Python is its simplicity and code reusability. With this, I mean, you can easily read Python codes, maintain and deploy them to other compiled languages like C and C++. Python also has the option of Object-Oriented Programming. You can equally use Python to program almost everything you want a computer to do for you; from database, file sharing, web design, server administration, games programming, GUI development and many more.

The book is around 500pps and my timeline is to see through in the next one month, all things being equal. Feel free to post your comments.

Monday, February 11, 2008

UBUNTU: The Linux Touch!

Ever since I have started using the computer system, my experience has always been with the Windows Operating system, owned and developed by the Microsoft Corporation. However, I decided this time around to change environment, to a different clime, so to say. Linux has always been in my mind, but the problem of not having a system of my own and the wherewithal (financially) to own a commercial distribution (like Fedora, Suse, Debian, etc) always discourage my will.


Luckily, I can now boast of a new HP Notebook with Vista pre-installed. And with the recent update of Ubuntu, a free, open source Linux distribution, I thought of switching without any hitches. There are reports (many of them) of incompatibility with Windows partition and booting processes. Nevertheless, I decided to take the risk to dual-boot.

Ubuntu is one of the free Linux distributions making the rounds now. Many are now dual-booting Vista with Ubuntu, at a less or free cost to their pause or hardware. The latest update is 7.10 and can be downloaded here. After downloading the CD/DVD images, you must burn it in order to make it a live bootable CD for your installation. But you must have a very fast Internet connection (broadband). The iso file is somewhere around 700MG. If don’t have a very fast Internet connection, then request for a live bootable CD for free from this site. What I did was to request for a live CD, and I received it after three weeks from the date I applied for it. It all depends on your location across the world.


For long I have been nursing the intention of using this distribution, and have been using the Ubuntu development/community website for my latest information. After receiving the free live CD, I obtained all the necessary information that can enable me to do that, easily, and started as follows:

  1. I backup all my data into a 4GB DVD plate;
  2. Ubuntu live CD does not come with any documentation a part from the little information at the back of the envelope. So I googled for all the necessary information required, and I have gotten much. Catch phrases like: “Dual-booting Ubuntu on Vista”, “Dual-booting Ubuntu on Windows” assisted me a lot;
  3. I read through most of the tutorials, with a special attention on the comments sections, where I found most of the common errors some have gone through;
  4. I boot up my system, and go to Computer Management (Start > Search > type Computer Management). I moved down to Disk Management on the left pane; double-clicked it, to view all my drives on the right pane;
  5. I then shrink my drive C (right-click ‘C’, click shrink volume). A window popped up, showing the available space I can shrink from “C” drive (21G). I selected it, clicked “ok”, and the changes took place. A partition has now been created, where Ubuntu is going to lodge itself;
  6. I then inserted my live CD into the DVD/CD ROM drive, and restart my system.
  7. As expected, the system boot from the live CD, and there, I saw the Ubuntu logo, commanding me to press “enter”, in order to commence the process. I press “enter”;
  8. At the initial stage, Ubuntu will install all the files onto your RAM and restart your system. So it did to me, and after restarting the system, I clicked on the Ubuntu logo on my desktop folder, and the real installation commenced;
  9. I was asked the normal questions; your name, username, region/country, time zone, and the partition I intended to port Ubuntu, I selected the partition I created (it calls it unused volume). After all these, the entire files were installed and was told to eject my live CD, as the system will soon restart immediately. I did as instructed;
  10. After a few tens of seconds, the system restarted, and there was I, in the world of Linux. Waoooooooo!!!;
  11. I then move, according to the instructions on the manual I obtained online, to make a file copy of the GRUB file in case of any eventuality. I went straight to the terminal – Applications > Accessories > Terminal - (like the DOS Shell or Command Prompt in Windows), and type the following command:

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_bak

and hit the "enter" button from my keyboard. This makes a copy of the grub file available in case of any failure. Of course I was asked my password, which I produced and the changes effected.

  1. I then proceed to type another set of command again, calling the grub file, in order to make some certain changes. To open the grub file in a text editor, I typed:

Sudo gedit /boot/grub/menu.lst

I hit enter and the grub file opened. I changed the system booting timeout from 10seconds to 15, and equally changed the booting sequence; instead of allowing Ubuntu, I let Vista be the default operating system, in the absence of any choice after the 15seconds timeout. I clicked "save changes", and exit. (You can find a comprehensive tutorial on how to do everything, with pictorials here)

From the experience I had installing and using Ubuntu, it seems the Ubuntu community has done a lot enhance this latest update. Because most of the problems users had with previous versions are no longer there, at all. One important feature of this free OS is that, you can share it with anybody, anywhere in the world. In fact, that has been the philosophy within the Linux circle. Knowledge, they say, must be free and useable at whatever circumstances. Ubuntu is very efficient, fast and boots within seconds. You can set the prestigious background or desktop effects. They remind me of the Windows Vista aero glass. There are equally office packages pre-installed. You have OpenOffice Word Processor, Spreadsheet, Presentation, Database and Graphics packages as you install Ubuntu. I always appreciate Ubuntu's power management, compare to Vista, which consumes all the power with its overwhelming graphics and absolute disk usage.

For now, I am still experimenting with Ubuntu, and if possible, will like to move to Debian, the main source of Ubuntu's strength. A lot has been said on the power of Linuux systems these days, and there is all indication that in the next decade and a half, Microsoft will find it very difficult to push aside the forceful power of Linux distributions in the home PC front.

Friday, February 8, 2008

My Tutorial Notes

For seven years I have been harboring the intent of becoming a computer programmer, but the saying that programming is the most difficult aspect in the knowledge of technology sends me shivering. I later on reaslise that though it all depends on your interest and what you promise to put in, in order to realize your dream.

Armed with this conception, I decided to go it all, starting with the basics in C#, using the Microsoft Visual Studio 2008 Express Edition. I have alot of interests in C, C++ and Java, but decided to start with C#. You may be reading somethings on PHP, MySQL, CSS, .NET, SQL Server 2005, Ruby, Python, and some updated stuff from Windows Vista security blogs.

In this blog, you shall be reading about my lessons, tutorials I undergo in some C# books (there are many of them of course). Am not a guru yet, just started learning the language or art. So, the content of this blog is authoritative at all. Consider it as my note book which I use in learning a subject or art in the classroom, though.

Feel free to contribute.