About the Blog

Back to Scriptionary

The Scriptionary blog is part of the Scriptionary wiki. Informal news and information will be announced here.

More…

Advertisement

Popular Tags

The tag with the most posts is the largest and vice versa.

DirectX SDK November 2008

6 November 2008 - 10:46, By E. Luten

Just released, get it while it’s hot.

It doesn’t look like there are any DirectX 11 previews in there. Is it my imagination or were those supposed to be in it? Thanks Aras for the confirmation that the DirectX 11 preview are actually in there.

EDIT2: The new DirectX redistributable was released today.

2 Comments | Tags: Tagged with:

What if .NET would be Discontinued?

3 November 2008 - 21:09, By E. Luten

I’m not known as a person who particularly likes the .NET framework but I still have to use it. The .NET Framework is basically a massive library of general purpose functions, much like the Standard Library is to C or the Standard Template Library is to C++.

But what if it all would be discontinued?

It’s not an impossibility and rather likely considering Microsoft’s track-record. The millions of applications, libraries and websites created with .NET would be useless.

I’ve been *fortunate* enough to be part of a VB6 (CGI) to ASP.NET (VB) conversion team and, trust me when I say this, you don’t want to be part of such an effort. These conversions require truckloads of time and money, and if you work for a mid-sized to large corporation, this could easily lead into the millions of dollars.

Now imagine all of your code obsolete. Everything you’ve coded since .NET 1.0. What would you do? Let’s take FoxPro as an example. Microsoft bought FoxPro in 1992 and released a couple of versions under the “Visual”-family of products. The last version was released in 2007 and a statement of Microsoft suggests that this is the last version.

No migration tools to any other language are being provided.

Another product would be J#, which will be retired in 2015. Keep in mind that J# is a fairly recent product and was only released with Visual Studio.NET.

How far will .NET go before a turning point is reached? Consider that .NET was first released publicly in 2002 and will be a decade old in less than four years. Knowing Microsoft, the end is quite possibly much nearer than you think.

No Comments | Tags: Tagged with:

Visual Studio 2010 CTP Released

30 October 2008 - 16:35, By E. Luten

Maybe this news is a bit old but Visual Studio 2010 CTP was released, you can get it at the following location:

Visual Studio 2010 CTP Site

For you who don’t know, CTP means Community Technology Preview and can almost be regarded as a public beta version.

For C/C++ developers, you can find more info on the next version of Visual C++ 2010 on the Visual C++ Team Blog. I’m glad to see that IntelliSense for VC++ is being improved since in 2008/2005 it’s a quite horrible technology. This version also has support for some C++0x functionality.

No Comments | Tags: Tagged with:

ASP.NET - Name Ambiguous by Nature?

30 October 2008 - 11:15, By E. Luten

The ASP.NET logoFirst of all, I have to mention that this colleague has been a C and ASM programmer for most of his lengthy professional career, I won’t mention his name here but let’s just call him “Joe the Programmer” in light of current braindead naming schemes.

Joe the Programmer recently started programming with the .NET framework but yesterday came to a stop. When he was asked to help out with .NET development using ASP.NET, he took some time and to his amazement couldn’t find the ASP.NET programming language in the Visual Studio “new project” dialog.

At first this made me chuckle and I brushed it off, but then I realized he was correct to assume that there should be an ASP.NET programming language. After all, there used to be an ASP programming language although it looked suspiciously much like BASIC.

After explaining that ASP.NET is not as much a language but a technology, he went on his way and continued programming.

This all made me think that maybe the name, ASP.NET, is ambiguous, vague and might be a concept difficult to grasp for guys like Joe the Programmer. I just hope that he has a concept of OOP to go along with his newly found knowledge of ASP.NET.

No Comments | Tags: Tagged with:

CriticalSection wrapper class

22 August 2008 - 11:09, By E. Luten

What: A C++ wrapper around both WINAPI (Microsoft Windows) and PThreads (POSIX threads) functionality.
Why: To abstract cross platform functionality.
Remarks: On windows, CRITICAL_SECTION objects cannot be shared cross-process. This means that the class is tied to your application or DLL process. Comments are in Doxygen/Javadoc style.

#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#include <pthread.h>
#endif

/**
 * @class A wrapper-class around Critical Section functionality, WIN32 & PTHREADS.
 */
class CriticalSection
{
public:
	/**
	 * @brief CriticalSection class constructor.
	 */
	explicit CriticalSection(void)
	{
	#ifdef _WIN32
		if (0 == InitializeCriticalSectionAndSpinCount(&this->m_cSection, 0))
			throw("Could not create a CriticalSection");
	#else
		if (pthread_mutex_init(&this->m_cSection, NULL) != 0)
			throw("Could not create a CriticalSection");
	#endif
	}; // CriticalSection()

	/**
	 * @brief CriticalSection class destructor
	 */
	~CriticalSection(void)
	{
		this->WaitForFinish(); // acquire ownership
	#ifdef _WIN32
		DeleteCriticalSection(&this->m_cSection);
	#else
		pthread_mutex_destroy(&this->m_cSection);
	#endif
	}; // ~CriticalSection()

	/**
	 * @fn void WaitForFinish(void)
	 * @brief Waits for the critical section to unlock.
	 * This function puts the waiting thread in a waiting
	 * state.
	 * @see TryEnter()
	 * @return void
	 */
	void WaitForFinish(void)
	{
		while(!this->TryEnter())
		{
		#ifdef _WIN32
			Sleep(1); // put waiting thread to sleep for 1ms
		#else
			usleep(1000); // put waiting thread to sleep for 1ms (1000us)
		#endif
		};
	}; // WaitForFinish()

	/**
	 * @fn void Enter(void)
	 * @brief Wait for unlock and enter the CriticalSection object.
	 * @see TryEnter()
	 * @return void
	 */
	void Enter(void)
	{
		this->WaitForFinish(); // acquire ownership
	#ifdef _WIN32
		EnterCriticalSection(&this->m_cSection);
	#else
		pthread_mutex_lock(&this->m_cSection);
	#endif
	}; // Enter()

	/**
	 * @fn void Leave(void)
	 * @brief Leaves the critical section object.
	 * This function will only work if the current thread
	 * holds the current lock on the CriticalSection object
	 * called by Enter()
	 * @see Enter()
	 * @return void
	 */
	void Leave(void)
	{
	#ifdef _WIN32
		LeaveCriticalSection(&this->m_cSection);
	#else
		pthread_mutex_unlock(&this->m_cSection);
	#endif
	}; // Leave()

	/**
	 * @fn bool TryEnter(void)
	 * @brief Attempt to enter the CriticalSection object
	 * @return bool(true) on success, bool(false) if otherwise
	 */
	bool TryEnter(void)
	{
		// Attempt to acquire ownership:
	#ifdef _WIN32
		return(TRUE == TryEnterCriticalSection(&this->m_cSection));
	#else
		return(0 == pthread_mutex_trylock(&this->m_cSection));
	#endif
	}; // TryEnter()

private:
#ifdef _WIN32
	CRITICAL_SECTION m_cSection; //!< internal system critical section object (windows)
#else
	pthread_mutex_t m_cSection; //!< internal system critical section object (*nix)
#endif
}; // class CriticalSection

No Comments | Tags: Tagged with:

Pages: 1 2 Next