In computer science, a thread of execution results from the split of a computer program into two or more tasks running simultaneously. At any given time a computer may be simultaneous executing several different applications or services. These programs run as processes within the Windows operating system, which allocates time on the processor(s) to different threads that execute code. As a result , by dividing the processor’s time among multiple threads, the operating system can create the appearance of simultaneously execution of multiple programs. The .NET Framework breaks down processes into subprocesses called application domains; the managed class System::AppDomain represents these subprocesses. An AppDomain is essentially a safe, isolated place where your programming code can execute. The term multithreading is basically the ability to have different parts of a computer program running at the same time. Multiple threads allow a program to simultaneously perform multiple blocks of code.
Multithreading can be used to:
- Communicate over a network
- Communicate with a database
- Perform time-consuming calculations
- Distinguish between operations with different priorities.
- High-priority threads can be used to manage real-time data feeds and calculations.
- Low-priority can be used for less critical tasks
While multi threading offers many advantages, fewer threads are still more efficient. Managing multiple threads can eat up large amounts of processor time and create new problems for a developer. Specifically, multithreading can create conflicts between threads that are trying to use the same resource. In order to make a multi threading program safe, we may have to control access to different resources or resources can create deadlocks or race conditions. Fortunately, the .NET Framework system provides several objects that can be used to control access to resources.
Threading Namespace
The System::Threading namespace contains types that allow us to create and manage multithreaded programs In .NET, a thread is either a foreground thread or a background thread. One difference between a foreground thread and a background thread is that a background thread will not keep an application running after all of the foreground threads have been stopped. Once foreground threads are stopped, the operating system will automatically stop any and all background threads. Also background threads will only run when the foreground thread is idle. The thread class allows you to create and manage foreground threads in our application. The thread constructor accepts a new ThreadStart delegate as a parameter. ThreadStart delegate accepts the address of a static or instance method.
The Code
MyClass.h
#pragma once
using namespace System;
using namespace System::Threading;
ref class MyClass
{
private:
int m_Value;
public:
MyClass(void);
~MyClass(void);
void Go();
void set_Data( int );
};
MyClass.cpp
#include "StdAfx.h"
#include ".\myclass.h"
MyClass::MyClass(void)
{
}
MyClass::~MyClass(void)
{
}
void MyClass::Go()
{
Thread::Sleep( 5000 );
Console::WriteLine( "This is another thread: " + m_Value );
}
void MyClass::set_Data( int x )
{
m_Value = x;
}
Thread_Example.cpp
#include "stdafx.h"
#include "MyClass.h"
using namespace System;
using namespace System::Threading;
int main(array ^args)
{
MyClass ^m_Obj = gcnew MyClass;
m_Obj->set_Data( 4 );
Thread ^m_Thread = gcnew Thread( gcnew ThreadStart( m_Obj, &MyClass::Go ));
m_Thread->Start();
Console::WriteLine( "This is your main thread." );
return 0;
}
My search experience at Monster.com
Lately, I have been browsing through some popular job search websites. (Monster.com, Carreerbuilder.com, HotJobs.com and Indeed.com). These sites provide a nice platform to discover what types of skills I would like to develop on my journey through life. With the unemployment rate about to hit 10% one can only imagine how well the traffic stats are looking for these guys. We are in the age of social networking, sites like LinkedIn, Facebook, Twitter continue to grow their user base. As the internet continues to evolves site like Monster will deliver us the next generation platform for career oriented content and social networking.
I was most impressed with the search experience Monster had offered. The site provided an appealing, fast, reliable search experience. Best of all they were the only site that provided the user with a refresh-less search, meaning while the user is navigating through their search results, the page never requires a refresh. When delivering the ultimate user experience features like the refresh-less navigation are key because it helps reduce user frustration when a page does not load correctly. The fact of the matter is sometimes the Internet just doesn’t work, it might be only for a moment, but if at that same moment you are refreshing, there is going to be some frustration. If you lost any type of data along the way then you might as well just hit the close button (which is what I do). If there is one thing I hate to do is waste time so keeping down time to a minimum ensures that I am completely satisfied with my experience.
I enjoyed my visit to Monster so much I decided to begin the process of starting a profile. I will continue to using their platform in the future so I decided to produce some feedback to ensure that they continue to be my first stop for career oriented content. It will be interesting to see if any of these suggestions make their way to the website. I have included a numbered screen shot to help understand my suggestions.
1. Search Results Navigation:
When Monster retrieves the results for a users search they provide the user with a search navigation control panel. This is located at the bottom of the search results section. These controls allow the user to navigate through their search results. While browsing I had noticed that when a user is navigating through search results the user must scroll to the bottom of the page to either proceed to the next or previous search results section. Once the user clicks the link to the next results page they are refreshed within the search results section. The refresh-less search then presents the user with a problem, since the page did not completely refresh the user remains at the bottom of the page and will proceed to view each result from bottom to top. Since the user had to view the results from bottom to top they find themselves at the top of the page when they have completed their viewing of that particular results page. If the user decides they want to continue to the next results page they are required to scroll back down to the bottom of the page for the navigation controls. I feel that these controls should be located on the bottom, top, and maybe have some sort of similar navigation functions on the sides to ensure the user is always flowing through the website .
2. Search Results Item Toolbar:
When Monster displays a search result they provide you with tools for each result item. These tools perform certain functions to enhance the user experience. First, we have a purple pin icon which provides the user with a Google map of the jobs location. Then there is a video option which I couldn’t even tell you what this feature would produce because I have yet to find a result that had leveraged it. Next, there is a stack of money icon that provides the user with a salary range. Finally, but most important… the orange box with the arrow. When this box is clicked it provides the user with an ”Actions” popup with a single individual link labeled ”Save” . While navigating through my search results I had experienced two problems with this feature.
The first problem I had encountered was while I was trying to save a search result. I would click the “Actions” popup feature and it would return a transparent popup making it unappealing and difficult to use/view . I feel that most of these features should be geared more towards a hover event inside each single result item rather than requiring the user to actually click on the object. These types of functions can fly right over users heads and possibly provide them with a bad experience while using the Monster platform. You will notice to the side I have included a shot of the “Recent Quotes” section of the Google Finance page. I feel a similar type of hover function button would work nicely implemented into the Monster experience.
3. Drag and Drop:
Giving the user the option to drag a result to their saved box would complement the feature discussed in #2 while providing the user with multiple ways to save their search results.It would deliver a more interactive user experience.
4. Multiple Regions Search:
The ability to search multiple regions at one time would also be a nifty feature, however if this type of feature is implemented I would suspect that there would probably be a need for a change in the method of sorting the results. This feature isn’t really on the top of my list, however I did find myself attempting to search multiple locations at one time but as you can see that path was a dead end.
5. Side Navigation:
One thing I have noticed I do not like about some sites is when they decide to put the side navigation on the right side of the screen. I personally feel that right side navigation can mess with the flow of a website (I read left to right.). If Monster decided to embrace this type of change I would suggest that they extend their header out a bit and align their side navigation with the search results. I have provided an simple example above to help understand my suggestion.
6. Less is More:
Finally, I have included a little screen shot of indeed.com. I also enjoy their search experience because they seem to live by the motto “Less is More”. Indeed has basically mimicked the Google search experience. If you haven’t heard lately, Google has masted search. I spend most of my moments online connected to Google in some sort of way. I feel a content cluttered sites can confuse users and distract them from what initially brought that user to your site. Sometimes the answer is right in front of the users face and one would assume content clutter causes a user to search out that same result somewhere else. Let the user explore the website rather than throwing it all at them at once. If the product is truly inferior the user will enjoy exploring the many features a platform has to offer.