Monday, April 19, 2010

Object Oriented Programming: Polymorphism

What is Polymorphism?

Polymorphism allows objects to be represented in multiple forms. Even
though classes are derived or inherited from the same parent class, each
derived class can have its own behaviour. Polymorphism is a concept linked
to inheritance and assures that derived classes have the same functions
even though each derived class performs different operations.

Polymorphism is important not only to the derived classes, but to the base classes as well. Designers of a base class can anticipate the aspects of their base class that are likely to change for a derived type. For example, a base class for cars might contain behaviour that is subject to change when the car in question is a minivan or a convertible. A base class can mark those class members as virtual, allowing derived classes representing convertibles and minivans to override that behaviour.

Object Oriented Programming: Inheritance


What is Inheritance?

In OOP, a parent or base class can inherit its behaviour and state to children or derived classes. Inheritance gives you the ability to build new classes based on an existing class. You can then extend a base class by enabling a new class to inherit its characteristics and behaviour.

Inheritance allows one class (the sub-class) to be based upon another (the super-class) and inherit all of its functionality automatically. Additional code may then be added to create a more specialised version of the class (Polymorphism).

For example a base class of vehicles can have sub-classes for cars or motorcycles. Each would still have all of the behaviour of a vehicle but can add specialised methods and properties. This mechanism of redefining the functionality of the base class in the derived class is called “overriding”

Some programming languages allow for multiple inheritances where a sub-class is derived from two or more super-classes. C# does not permit this but does allow a class to implement multiple interfaces. An interface defines a contract for the methods and properties of classes that implement it. However, it does not include any actual functionality.

Saturday, March 27, 2010

Object Oriented Programming: Abstraction.


What is Abstraction?

Abstraction is the process of hiding all but the relevant data about an object in order to reduce complexity and increase efficiency. The result of removing the elements not directly related to solving the problem at hand is that you're able to focus specifically on the problem and not be mired in the details of how your class works. The class's interface is the implementation of the abstraction.

This understanding will help you create an interface that gives the user access to the information and methods that they need, yet insulates them from the internal workings of the class. You need to design an interface not only to solve today's problems but also to abstract sufficiently from the class's internals so that private class members can undergo unlimited changes without affecting existing code. The user can then declare/modify attributes, variables and methods within the class without having to worry about clashes with other objects. This basically means that data within a class is only available /modifiable via the class methods.

Always consider the programmer who is going to instantiate or derive from the classes that you create when designing your classes. Designing the abstraction of your classes in a way most useful to the programmers using them is paramount in developing reusable software.

Access Modifiers

Abstraction in C# can be achieved by using Access modifiers when designing your class. Access modifiers are keywords used to specify the declared accessibility of a member (such as a variable, constant or method) or type (which could be a data type such as an integer or a string).

In C# there are 5 different types of Access Modifiers.
Modifier
Description
Public
There are no restrictions on accessing public members.
Private
Access is limited to within the class definition. This is the default access modifier type if none is formally specified
Protected
Access is limited to within the class definition and any class that inherits from the class
Internal
Access is limited exclusively to classes defined within the current project assembly
protected internal
Access is limited to the current assembly and types derived from the containing class. All members in current project and all members in derived class can access the variables.

public: Any code that uses a class can only access the methods that have been marked with the keyword public. The public declaration gives the interface to the external world and defines what the class does, as viewed by the rest of the world.

private: This means that it is not visible outside the class, Marking a field or method as private effectively ensures that that field or method will be part of the internal working of the class, as opposed to the external interface. The advantage of this is that if you decide to change the internal you can just make the change without breaking the code outside the class definition - nothing from outside of this class can access this field.

protected: The protected keyword makes a member accessible within its class and by derived class instances.

internal: The internal keyword makes a member accessible by any code in the same assembly, but not from another assembly. A common use of internal access is in component-based development because it enables a group of components to cooperate in a private manner without being exposed to the rest of an application’s code.

protectedinternal: The protectedinternal accessibility means protected OR internal, not protected AND internal. In other words, a protectedinternal member is accessible from any class in the same assembly, including any derived class in another assembly.

Thursday, March 11, 2010

Object Oriented Programming: Encapsulation



What is Encapsulation (or information hiding)?

Encapsulation (as in enclosed in a capsule), sometimes called information hiding, is the ability to hide the internals of an object from its users and to provide an interface to only those members that you want the client to be able to directly manipulate. 

Encapsulation provides the boundary between a class's external interface, its public members visible to the class's users and its internal implementation details. The result is that each object exposes to any class a certain interface (those members accessible to that class). The interface must encapsulate the implementation - hide it from other parts of a program and protect an implementation from unintended actions and inadvertent access, exposing only the members of a class that will remain static, or unchanged, while hiding the more dynamic and volatile class internals. 

The advantage of encapsulation means once the interface to the object is designed you don't have to be concerned as others work on it, fix bugs and find better ways to implement it. You'll get the benefit of these improvements but none of them will affect what you do in your program. Because you're depending solely on the interface nothing they do can break your code. Your program is insulated from the object's implementation. The implementation is insulated from anything that you or other users of the object might do.

Wednesday, March 03, 2010

Object Oriented Programming: The Class


What is a Class?
The difference between a Class and an object is a source of a lot of confusion for programmers new to the terminology of object-oriented programming. The basic building blocks of object-oriented programming are the class and the object.

In object-oriented programming, a Class is a construct which is defined by a programmer in code and is used as a template (or blueprint) to create objects of that class. This template describes the state and behaviour that the objects of the Class all share.

A class encapsulates the state and behaviour of the concept it represents.
·         It encapsulates state through data placeholders called attributes (or member variables);
·         It encapsulates behaviour through reusable sections of code called methods.

A class is used to create new instances (Objects) by instantiating the class. An Object doesn't exist until an instance of the class has been created. The class is just a definition.

Tuesday, February 23, 2010

Object Oriented Programming: The Object

The Object

What is an Object?

To define objects we have to define two things:
·         State (Attributes, properties)
·         Behaviour (Methods)

Real-world objects share two characteristics: They all have state and behaviour. Dogs have state (name, colour, hunger) and behaviour (barking, fetching, wagging tail).

Real-world objects vary in complexity; a desktop lamp may have only two possible states (on and off) and two possible behaviours (turn on, turn off), but a desktop radio might have additional states (on, off, volume, station) and behaviour (turn on, turn off, increase volume, decrease volume, seek, scan, and tune). You may also notice that some objects, in turn, will also contain other objects. These real-world observations all translate into the world of object-oriented programming.

The term “Object,” that gives OOP its name, refers to a conceptual object that represents an item in our program or system. This could be anything from a button on a web page or a computer file, to a real world object such as a car.

Software objects like real-world objects also consist of state and related behaviour.
·         An object stores its state (Attributes) in fields or variables
·         An object exposes its behaviour through methods (functions in some programming languages).
Methods operate on an object's internal state and serve as the primary mechanism for object-to-object communication.

Hiding the internal state and methods of a class through abstraction and requiring all interaction to be performed through an object's methods is known as encapsulation.

Bundling code into individual software objects provides a number of benefits, including:
·         Modularity: The source code for an object can be written and maintained independently of the source code for other objects. If a particular object turns out to be problematic, you can simply remove it from your application and plug in a different object as its replacement. This is analogous to fixing mechanical problems in the real world. If a bolt breaks, you replace it, not the entire machine.
·         Information-hiding: By interacting only with an object's methods, the details of its internal implementation remain hidden from the outside world.
Code re-use: If an object already exists (perhaps written by another software developer), you can use that object in your program.

Wednesday, February 17, 2010

Principals of Object Oriented Programming (OOP)



I decided to write this as I remember how hard it was to get my head around the principals of Object Oriented Programming (OOP) when I made the jump from procedural (or sequential) programming in C to using OOP in  C#.
I think some programmers underestimate how big a leap this is when someone say from an engineering background who learned to program in a procedural language has difficulty with the principals of OOP. This is mainly because it just isn't how we learned to think about programming and requires having to relearn our approach to solving our programming problems.


Object oriented programming (OOP) is a programming model that uses the concept of breaking programs or assemblies into a collection of smaller more manageable Objects or building blocks thus keeping projects simple and promoting improved code reusability and maintainability.

A Class (classification - class) represents the definition for an object. A class is the generic definition of what an object is - a template. A term unique to OOP, instantiation, is simply the act of creating an instance of a class. That instance is an object.

A summary of the principals that define OOP are:

Encapsulation:
Binding related data and functionality in an object is called data encapsulation and allows the user to hide the information/behaviour of the object from the outside world using abstraction.

Abstraction:
Abstraction is the process of hiding all but the relevant data about an object in order to reduce complexity and increase efficiency.

Inheritance:
In OOP, a parent or base class can inherit its behaviour and state to children or derived classes. Inheritance gives you the ability to build new classes based on an existing class. You can then extend a base class by enabling a new class to inherit its characteristics and behaviour.

Polymorphism:
Poly meaning many, and morph meaning forms, literally many forms. Polymorphism allows objects to be represented in multiple forms. Even though classes are derived or inherited from the same parent class, each derived class will have its own behaviour. Polymorphism is a concept linked to inheritance and assures that derived classes have the same functions even though each derived class performs different operations.




Sunday, January 31, 2010

SQL management studio 2005: Creating a temp pivot table

I used the following dynamic SQL to create a temp pivot table in a script to join onto my final result set. I used this method as the names of the columns could change depending on user input.
It involves creating a temp table then adding columns and populating the table using dynamic SQL in  a loop.




DECLARE @work_order int
--create temp function table first
DECLARE @function_table TABLE (primary_key INT IDENTITY(1,1) NOT NULL,
[Function] varchar(100))

DECLARE @item_category_counter INT
DECLARE @loop_counter INT

INSERT INTO @function_table
SELECT wo_team_label_desc FROM ref_wo_team WHERE dept_id = @dept_id AND
inactive_ind = 0 ORDER BY sort_order

--Pivot function table
CREATE TABLE #PIVOT_FUNCTON_TABLE (primary_key INT IDENTITY(1,1) NOT NULL,
work_order int)

SET  @loop_counter = ISNULL((SELECT COUNT(*) FROM @function_table),0)
-- Set the @loop_counter to the total number of rows in the memory table

SET @item_category_counter = 1

WHILE @loop_counter > 0 AND @item_category_counter <= @loop_counter
BEGIN

--Add dynamic column name
DECLARE @ColumnName NVARCHAR(100)
SET @ColumnName = (select [Function] FROM @function_table WHERE primary_key
= @item_category_counter)
DECLARE @query NVARCHAR(4000)
SET  @query = 'ALTER TABLE #PIVOT_FUNCTON_TABLE
ADD [' + @ColumnName + ']  NVARCHAR(100);'
EXECUTE(@query)

SET @item_category_counter = @item_category_counter + 1
END

DECLARE @item_category_counterWO INT
DECLARE @loop_counterWO INT

SET  @loop_counterWO = ISNULL((SELECT COUNT(*) FROM @WOtable),0)
-- Set the @loop_counter to the total number of rows in the memory table
SET @item_category_counterWO = 1

WHILE @loop_counterWO > 0 AND @item_category_counterWO <= @loop_counterWO
BEGIN

SET @work_order = (SELECT work_order_id FROM @WOtable WHERE primary_key =
@item_category_counterWO)

--Populate table
DECLARE @item_category_counter3 INT
DECLARE @loop_counter3 INT

SET  @loop_counter3 = ISNULL((SELECT COUNT(*) FROM @function_table),0)
-- Set the @loop_counter to the total number of rows in the memory table

SET @item_category_counter3 = 1

DECLARE @UpdateQueryHead NVARCHAR(4000)
DECLARE @UpdateQueryBody NVARCHAR(4000)
DECLARE @UpdateQueryFooter NVARCHAR(4000)
SET @UpdateQueryHead = 'INSERT INTO #PIVOT_FUNCTON_TABLE VALUES (' + (CAST
( @work_order  AS NVARCHAR(4000))) + ''
SET @UpdateQueryBody = ','
SET @UpdateQueryFooter = ')'

WHILE @loop_counter3 > 0 AND @item_category_counter3 <= @loop_counter3
BEGIN

--Create @UpdateQueryBody string
DECLARE @Value NVARCHAR(100)
SET @Value = Replace(
(SELECT RU.first_name + ' ' + RU.last_name
FROM wo_team WOT
INNER JOIN ref_wo_team rwt ON  WOT.dept_id = rwt.dept_id AND WOT.wo_team_id
= rwt.wo_team_id
INNER JOIN ref_user RU ON WOT.dept_id = RU.dept_id AND WOT.user_id = RU.
user_id
WHERE WOT.dept_id = @dept_id
AND work_order_id = @work_order
AND WOT.user_id <> ''
AND WOT.user_id <> 'NA'
AND WOT.user_id <> 'N/A'
AND wo_team_label_desc = (select [Function] FROM @function_table WHERE
primary_key = @item_category_counter3)),'''','')

SET @UpdateQueryBody = @UpdateQueryBody + (CASE WHEN @Value IS NULL THEN
'NULL' ELSE  '''' + @Value + '''' END) + ', '
SET @item_category_counter3 = @item_category_counter3 + 1

END

DECLARE @UpdateQuery NVARCHAR(4000)

--Remove trailing comma
SET @UpdateQueryBody = SUBSTRING ( @UpdateQueryBody ,1 , (len(
@UpdateQueryBody)-1))
SET @UpdateQuery = @UpdateQueryHead + @UpdateQueryBody + @UpdateQueryFooter

EXECUTE(@UpdateQuery)

SET @item_category_counterWO = @item_category_counterWO + 1
END

SQL 2005 Reporting services: Columns merging when exporting to Excel.

Came across this problem when I created a report which my users wanted to export to Excel.

The problem was that when the report was exported, Excel merged some of the columns. This caused problems for my users when they wanted to work with the data in excel (pivoting the data, etc.)

The problem was caused by the positioning of the labels in my report header. If the labels did not start or end exactly at the same position as my tables, Excel inconveniently merged two columns to cope with it.

The solution was to (with a bit of trial and error) to line up the labels with the start and end of the table. Another solution is to make your title labels the full width of your report and centre your text. This does not always work when you are working with matrix's as you can not always be sure of the width of your report. In this case line up your label with a column in your table that will always be a fixed width.

SQL 2005 Reporting services: Create alternating colours in a table or matrix (Green bar effect)

Alternating colours in a table is fairly easy and can be done by setting the background colour on the row as follows:

Iif((RowNumber(Nothing) Mod 2 = 0), "White", "WhiteSmoke")

Doing the same in a matrix is a bit more complicated. There is probably several methods out there but I find the following one to be the easiest:

First create a function in the report code as follows

Private bOddRow As Boolean
'*************************************************************************
' -- Display green-bar type color banding in detail rows
' -- Call from BackGroundColor property of all detail row textboxes
' -- Set Toggle True for first item, False for others.
'*************************************************************************
Function AlternateColor(ByVal OddColor As String, _
ByVal EvenColor As String, ByVal Toggle As Boolean) As String
If Toggle Then bOddRow = Not bOddRow
If bOddRow Then
Return OddColor
Else
Return EvenColor
End If
End Function


Next set the row colours on the matrix by setting the background colour as follows:

Code.AlternateColor( "White","WhiteSmoke", True) ----> Set this on the matrix row group

Code.AlternateColor("White","WhiteSmoke", False) -----> Set this on the cell

A combination of effects can be achieved using this method such as a checker board effect by changing the True/False values and the colours.

Thursday, January 14, 2010

Back again

Wooooo, I havn't used this in a while. I oridginaly started this blog to record what I was doing in college and to record my ramblings. As you can see I sort of got side tracked lol.
So I have decided to try again. Its funny all the stuff I was reading back then. At that time I was working in the chemical industry and studying a BSC in Electronic Engineering and Computer Systems to try and enhance my career in the chemical industry. I am now working as a software engineer in the financial sector. Funny how things work out. Anyway I love what Im doing now so it all worked out well.
I'm planning to use this blog to record problems and the solutions I've come up with in software design so I can use them again. I would appreciate any comments.

Monday, April 11, 2005

My Torrent Guide

Just thought I would put together a Bit-torrent guide. Don't be expecting any rocket science here. This is just going to be the basic's.

First of all I am stating that to copy films / files/ programs/ software without the owners permission is illegal!! Do not do it. Any information that follows is purely educational.

With the advent of broadband technologies such as DSL and cable modems, the everyday user suddenly has a big chunk of bandwidth, not only for download, but also upload. Sharing files directly from your computer (without first sending them to a server) is now a reality. This is where p2p comes in. The acronym p2p stands for peer-to-peer, which basically means client to client. That is, you download files from people like you instead of from big servers, and in turn they download files from you. You share your files, your friends share their files, and everyone talks directly to each other.
The problem with most P2P networks is that many people just don't like to share. They open up their program, download their files, then close the program before they can help anyone else. It's called leeching. BitTorrent is a P2P file swarming application. This means that as soon as you have downloaded a few chunks of a file it will start uploading it to others, thereby spreading the file better. This makes it easier to get the file from many different people at once, thereby increasing the probably that you'll get a good download speed. This means that the more you upload, the faster you'll download.

You first need to install a Bit Torrent client to be able to download from BitTorrent. There is a evergrowing list of these.
Next you have to find a Bit Torrent to download. There are lots of sites out there which have links to whatever Torrent you prefer.

Guide to torrent abrievations;
I am not an expert and if anyone has a better explanation please help clear up my (mis)understanding,
CAM- usually lowest quality, like camcorder in a theater
TS - TeleSync visually about as good maybe better than CAM, but has a direct source to the audio, so audio is usually better than CAM
TC - TeleCine, much better than CAM and TS, not exactly sure how movie is recorded
Screener - usually DVD of new movie that is sent out early to stores or awards organizations or even as promotional material... usually has property of so and so studios or some other marker like station identification or subtitles...
I'm not sure why some people choose to put out DivX or XviD, or VCD vs. SVCD or DVDrip or .iso or .cue or .bin files, probaly down to personal choice, but in the end if you want to put these files onto DVD then you have to convert them again with the appropiate software. So you can see this process takes time and it's just not a walk in the park.

ZoooooooooM

The Madasafish 8Mbps trial has begun! A handful of lucky Madasafish customers were selected to assist in testing the super-fast broadband service which is expected to launch later this year. With an 8Mb connection online gaming, internet radio and the future promise of TV over broadband will be seamless and waiting for content to load will be a thing of the past.

Click here for link to full article.

Powerline communications come of age

Power line communications (PLC) has evolved into Broadband Powerline Communications (BPL) that has two primary applications - broadband access (BPL-Access) and home networking (BPL-Indoor)
A new report has been produced on this technology by Research and Markets Ltd and finds that:
- Every household connected to the power grid can be offered BPL-Access service by the power utility in partnership with the appropriate vendor. More than eighty trials and commercial deployments are currently underway in all the continents.
- BPL has matured to a point where it poses a serious challenge to entrenched technologies in the realms of both broadband access and home networking. Since BPL allows the use of existing infrastructure, it lowers the cost of deployment and allows service providers to offer competitive pricing.
- BPL-Access offers higher data rates than other widely available competing alternatives such as DSL and cable modem. Similarly, BPL-Indoor competes against other home networking technologies, such as Wi-Fi and HomePNA, and offers several competitive advantages.
- A wide range of innovative BPL-enabled devices are being introduced into the market. These devices range from broadband gateways, digital media adapters, personal computers (PCs), and home security monitoring devices. More than 30 device vendors are competing in this market.
- The HomePlug standard is driving the home networking market. Intellon?s ?turbo? solution supports 85 Mb/s, and the upcoming HomePlug AV standard will support 200 Mb/s. Competing proprietary solutions have been proposed by DS2, Spidcom, and Panasonic. All these solutions support Internet Protocol Television (IPTV) and triple-play applications - data, voice and video.
- There is no BPL-Access standard, but several proprietary standards with unique capabilities are being offered. DS2?s 205 Mb/s technology, which enjoys the support of most of the BPL-Access vendors, has been chosen as the baseline technology by the OPERA consortium. The HomePlug standard is being enhanced to support BPL-Access, creating the prospect of multiple competing standards.
- Vendors involved in BPL range from start-ups to established players such as Mitsubishi, Panasonic, Siemens, Sharp, and Samsung. Additional major vendors will get involved in BPL in the coming months.
- Service providers involved in BPL range from telephone operators (BellSouth, France Telecom), cable companies (Comcast, Cox), satellite services providers (Hughes, EchoStar), and fixed wireless access providers.
- Those deploying BPL-Indoor solutions include schools, hotels, and multi-dwelling units (MDUs) and multi-tenant units (MTUs). In addition, there have been several of deployments in residential neighborhoods.

Thursday, March 31, 2005

Important Emerging Trends

One of the most important emerging trends at the minute seems to be Voice over IP and IP Telephony. We discussed in class the various advantages this service could provide if fully realised. So it was not surprising when I found this web page on the subject. I have summerised as follows. Please read.
Voice over IP (VoIP), the convergence of voice over packet-switched IP data networks, and IP Telephony are amongst the most important emerging trends in telecommunications. The business case for implementing VoIP or IPT will inevitably include such business benefits as increased functionality, ACD, CTI and extension mobility whilst cost savings may be found in reduced on-net call costs and lower costs associated with moves, adds and changes. However, once inherent start-up costs are considered, it can be challenging to build a business case based entirely on cost especially for companies currently with a private internal network or having an install base that is not fully depreciated.
Implementing VoIP requires attention to many factors including: available bandwidth, Qos/Cos policies, manageability, scalability, functionality requirements, availability (including survivable remote solutions for branch office networks), performance and security. Integration is another key consideration as, inevitably, large enterprise telephony environments often feature heterogeneous, multi-vendor networks with disparate devices deployed for the distinctive needs of their large and small sites.
Business deployment can be hindered by the lower quality of voice over IP.
Voice quality is a subjective topic and the definition of ‘good’ voice quality varies greatly with business needs and user expectations. Whilst lower delay, packet loss and jitter values produce the best voice quality the trade off may come in the form of increased costs associated with network infrastructure upgrades. There is also a trade off between real world limits and acceptable voice quality. Indeed some limits lie beyond easy control (such as the inherent fixed delay between geographically remote sites, for example between the UK and India).

Here is a link to the full article

Thursday, March 24, 2005

My Top 10 list of free downloads sites.

Everyone likes to get something for nothing. So here's my top ten list of free download sites. You will find something that you like- completely free!!!

1. www.download.com


2. www.fileplanet.com


3. www.majorgeeks.com


4. www.addictive247.co.uk


5. www.freeserifsoftware.com


6. www.freeukstuff.com


7. www.zdnet.com


8. www.freewareandstuff.com


9. www.tucows.com


10. www.fontvillage.com

Monday, March 07, 2005

Course round-up

So far the course is interesting and I'm learning a lot from it. For example, have a look at my Online C.V. and let me know what you think (click on the link). I know the web page is very basic, but it is my very first attempt at web design, something I never thought of ever doing. I plan to add to it as I learn more. So you never know, it could could all "singing and dancing" after a while. I am learning about the different protocols used in networking and their encoding. Also I have learned a bit about MPEG encoding, something I want to go into a little deeper. WHY IS THERE SO MANY CODEC's?
Our next lecture touches on peer to peer networking (file sharing) As I am interested in BiT-Torrent, (A form of file sharing, used mainly in sharing movies. Also see my links). this should be interesting.
Also, part of the lectures are videos on various topics on networking and the internet. These form a very important part of the course and I feel link the course to the "REAL WORLD". One of the video's was about "911", the World Trade Center disaster and how it affected the public telephone network. One of the buildings destroyed beside the World Trade Center contained one of the biggest public telephone switching nodes in America and all traffic had to be routed away from it. As was shown in the video, cables were even temporaly put through the office window of one building and into the window of another building across the street. It was truely was a feat of engineering. It also showed, how in times of crisis how much traffic increases on the public telephone network, with everyone desparate for information and how this was dealt with. Many people also started their own web sites, to list people that survived. It makes you think how much we depend on information.

Sunday, March 06, 2005

Good Bye Dial-up!!!

100% ADSL coverage in Northern Ireland
Northern Ireland became the first UK region, outside of London, to have every one of its exchanges enabled for broadband. The announcement was made by BT Northern Ireland in association with the Department of Enterprise, Trade and Investment (DETI) and the Building Sustainable Prosperity programme.

Thursday, February 24, 2005

Research

I've been reading some of the other blogs of the people in my class and I'm very impressed. Our class comprises of computer science students and electronic and computer system engineer's. Some of these guys are naturals at this sort of thing.
So I've been thinking on what sort of content to put on my blog. I think I'll give a report on my lessons so far, with a few of my rants and raves just for fun. Also, as I have stated on my profile, I am interested in Bit Torrent, so I will also give a report on what I know of Bit torrents and what I find out in the future. So keep tuned folks.....

Monday, February 21, 2005

Working Life

Just thought I'd rant again.....IT IS REALLY HARD TRYING TO STUDY PART-TIME. Especially when you work shifts, have two children and a nagging wife (hope she doesn't see this!!)