Archive for the ‘Novice’ Category

Module Reuse

March 15, 2011 Leave a comment

An interesting paper on software reuse. After the complete failure of OO to deliver any form of software reusability (I knew that from the first OO training course…) it appears we are turning back to functional programming in search of the elusive reusability. Oh well…

Categories: Novice, Theory

The Babel Tower of Programming Languages

March 14, 2011 Leave a comment

For a new programmer there is the difficult choice of what programming language to use.Although some languages are more popular than others, it is very hard to choose which one fits your needs and your liking. It’s like choosing which foreigh language you’ll learn next!There are so many and so different!One of my professors showed us this drawing of a Programming Tower of Babel,and if you think about it,the original myth applies perfectly in the case of programmers.Everyone has his favourite one and they end up disputing about which language is the best!

Categories: Level, Novice

How to register a font in Windows in an MFC/C++ application

February 27, 2011 Leave a comment

We had a problem with a barcode font in Windows. The font is distributed and installed with our Windows application InstallShield installation package. However for some reason the font was not being registered by Windows and out application couldn’t use the font. Registering a font in Windows is normally a simple case of copying it to Fonts directory of the Windows installation. So the simple thing to do is to register the font programmaticaly so the application could use it. Below is the code.

const DWORD buff_size = 50;
LPTSTR buff = new TCHAR[buff_size];
const DWORD var_size = GetEnvironmentVariable(_T(“SystemRoot”),buff,buff_size);
CString file = buff;
HANDLE  handle = 0;
int nResults =0;
CString strMessage;
strMessage.Format(ResStr(IDS_FONT_FILE_ERROR), file) ;
nResults = AddFontResourceEx(file,FR_PRIVATE,NULL);
delete buff;

Categories: Level, Novice

Open-plan offices are making workers sick, say Australian scientists

February 16, 2011 Leave a comment

THE evidence is overwhelming – working in an open plan office is bad for your health.

Australian scientists have reviewed a global pool of research into the effect of modern office design, concluding the switch to open-plan has led to lower productivity and higher worker stress.

“The evidence we found was absolutely shocking,” researcher Dr Vinesh Oommen from the Queensland University of Technology’s Institute of Health and Biomedical Innovation, said.

“In 90 per cent of the research, the outcome of working in an open-plan office was seen as negative, with open-plan offices causing high levels of stress, conflict, high blood pressure, and a high staff turnover.

“The high level of noise causes employees to lose concentration, leading to low productivity, there are privacy issues because everyone can see what you are doing on the computer or hear what you are saying on the phone, and there is a feeling of insecurity.”

Dr Oommen said there was also a higher chance of workplace conflict caused by “sitting so close to someone that each time their phone rings you can get irritated”.

“I think most of us, including myself, can relate to that,” he said.

Working in an open-plan office could contribute to higher blood pressure, Dr Oommen said, and an increased risk of illnesses as bugs such as the influenza virus were more swiftly passed around.

“Based on these findings, I think employers around the country need to rethink the open-plan environment in their offices,” he said.

“The research found that the traditional design was better – small, private closed offices.

“The problem is that employers are always looking for ways to cut costs, and using open-plan designs can save 20 per cent on construction.”

Dr Oommen’s study has been published in the Asia-Pacific Journal of Health Management.

Microsoft’s general confusion with booleans

February 11, 2011 Leave a comment

One would think that a boolean is a pretty easy to grasp and define primitive data type.  True or False and that’s the end of story…

Unless of course you are Microsoft.

The Boolean with 3 possible values..

Type: BOOL

If the function retrieves a message other than WM_QUIT, the return value is nonzero.

If the function retrieves the WM_QUIT message, the return value is zero.

If there is an error, the return value is -1. For example, the function fails if hWnd is an invalid window handle or lpMsg is an invalid pointer. To get extended error information, call GetLastError.

Apparently -1 is not a nonzero value.

The TriStateBoolean with 5 possible values.. 3 of them not supported..

MsoTriState Enumeration

Office 2007

Office Developer Reference

Specifies a tri-state Boolean value.

Name Value Description
msoCTrue 1 Not supported.
msoFalse 0 False.
msoTriStateMixed -2 Not supported.
msoTriStateToggle -3 Not supported.
msoTrue -1 True.

The Irony of Software

February 1, 2011 Leave a comment

So you have a bespoke/custom business software application that has been running for years. You have added all the customisations you wanted. You have fixed all the bugs. You have fixed all the memory leaks, all the memory corruptions and have improved its performance and removed all the bottlenecks. All that took plenty of money, effort and time.

Your software application which is at the centre of your operations has reached its peak of performance and now works better than ever.

And then you decide to replace it because its technologies are no longer in ‘fashion’ and without any real business need to do so. And you will replace it with something that doesn’t come anywhere near the performance and reliability of your existing system. I cannot think of any other engineering sector or product where this occurs so frequently.  I mean, normally you wouldn’t throw away something that actually works very well…would you?

And it’s not only bespoke software that is affected by this irony. Just compare, MS-DOS with the early Windows versions, Windows XP with Windows Vista etc.

Categories: Level, Novice

Who is a software engineer?

January 31, 2011 Leave a comment

A software engineer is an engineer who applies the principles of software engineering to the design, development, testing, and evaluation of the software and systems that make computers or anything containing software, such as computer chips, work.[1]

So a software engineer is not just the person who simply programs, but he is also  an analyst and tester. In case that someone is only working in some of those stages then he is not called software engineer but software designer, software developer, testing engineer or software evaluator.


[1] Wikipedia (Software engineer)

Categories: Novice, Theory