Office Bingo iPhone app!

August 18, 2009

My first iPhone/iPod app is now available in the iTunes App Store!

Want to play a fun game with your work-mates during boring meetings?  Tired of hearing your managers and colleagues sprout out corporate buzzwords and jargon?  Liven up your office meetings with…

Office Bingo!

One reviewer calls it, “Highly amusing!”

Another reviewer says, “Chortle!”

Another rates it 4 stars!

(The above may, in fact, all be the same reviewer.)


Daz! Come back!

June 23, 2009

This is an open letter and public shout out to my mate Daz, aka The Dazzler, aka The D-Man, aka D-Dawg,* to return to his former blogging ways.

Daz, I know the lure of Twitter has been too much to turn down, what with it’s simple interface and enforced textual limit that seems so friendly in comparison to the behemoth of the blog…  but you had so much good in you that was left unsaid.  Sometimes good things need more than 140 chars.

So, come back, ye olde chappe, and speak henceforth those software development words of wisdom!  :-)

* Daz may, in fact, not actually be also known as these nicknames.


How to support wildcard email addresses in Exchange 2007

June 10, 2009

If you need Exchange to accept wildcard email addresses, e.g.

fred*@domain.com

*fred*@domain.com

so that, for instance, mail sent to “hello_fred_how_are_you@domain.com” is routed to an appropriate mailbox (such as fred@domain.com), then you’ll need to write (as in program) your own Transport Agent.

1.  Create your own SMTP receive agent.  You’ll need Visual Studio 2005 or above and some programming ability.

2.  Hook your agent up to the RcptCommandEventHandler and write the necessary code to examine the event’s RecipientAddress, and, if it meets your wildcard needs, replace the RecipientAddress with the destination mailbox.

E.g.

// If the recipient address contains “fred” then replace
// whatever it is with Fred’s real mailbox address.

// Pseudocode:

if (event.RecipientAddress.LocalPart.ToLower().Contains(“fred”))
{
event.RecipientAddress = new RoutingAddress(“fred@domain.com”);
}

(Make sure you understand the implications for spam!)

3.  Install your Transport Agent (a DLL) on the Exchange server using the Install-TransportAgent and Enable-TransportAgent cmdlets.

If you get any errors like:

Invalid agent configuration in file

when running the Transport Agent cmdlets, check the permissions on the agents.config file.

C:\Program Files\
Microsoft\Exchange Server\TransportRoles\Shared\agents.config

Temporarily give Full Control to the Everyone object on that file and see if that fixes the problem.  If so, remove Everyone and find out who needs access to it!

4.  Finally, and very importantly, make sure the priority of your new Transport Agent is lower than the Recipient Filter Agent.

Run the get-transportagent cmdlet to see all the agents and their priorities.  Use the set-transportagent cmdlet to change your agent’s priority, and put it lower than the Recipient Filter Agent.

Otherwise the Recipient Filter Agent will execute before your new agent and it will reject the wildcard email addresses since they’re not valid.  Your agent, if placed before the Recipient Filter, intercepts these invalid email addresses and changes them to the correct, valid addresses.


Classic programming question

June 8, 2009

Hello All -

I need to do this: I need the exchange server to embed an image into each outbound email message, the image size is small (less than 50K).

I need to use a transport agent i have succesfully started up visual studio 2008 and copied the necessary dll files over, the refernces have also been loaded.

however at this point i think i would “Program” which i do not know how to do, is there a programmers manual that would explain in the necessary detail as to how to accomplish tihs?

Please advise…

(Emphasis mine; from here.)


Refactoring code into fewer lines does not necessarily reduce its complexity

May 20, 2009

Developers are almost universally aware that they should try and write code that is simple to read and maintain.  Complicated code can be a stumbling block for another developer (or even yourself at a later date) when he/she needs to fix bugs or modify functionality.

So refactoring existing code in an effort to reduce its complexity is definitely a good thing.

But refactoring code into fewer lines does not necessarily mean that its complexity has been reduced.  In fact, the opposite can occur.

Take this example posted by an Intel blogger.  While I fully agree that lambdas are awesome, and I eagerly await them in C++0x, I don’t agree with his assertion that the lambda version of his example is simpler.  Regarding his first non-lamda version, he concludes, “The code is indeed complex. It contains too many lines and three methods.”

Certainly the first example has more lines than the lambda equivalent.  But on its own I wouldn’t call the first example complex at all.  It has a function event handler for the control, a function for the thread, and a function for the UI callback.

The lambda version just puts the thread function and callback function into anonymous functions inside the control’s event handler.

Syntax-wise, I’d argue the lambda version is more complex than the first.


English: The last line of defense against malware?

January 13, 2009

The other day my mum-in-law called and was worried about her PC.  It was displaying messages that there was a virus and asking what to do about it.

So I figured I’d have to try and find out where these notifications were coming from.  Were they from a legitimate source like Windows Defender or an antivirus program?  Or was it some web site displaying hoax popups, trying to get the user to download and run some nasty piece of code?

But I didn’t have to go down that route, as she went on to say something like, “But what it says isn’t even correct.  It says, ‘A virus on your computer has been founded’.”

That was enough to convince me that it was a hoax.

So to all you malware authors out there in my blog readership:  If you want to trick someone into downloading your nasties then work on your presentation, grammar and spelling.


I got a D for programming

October 24, 2008

D

Occasionally when I get a free moment I’ve been checking out D, a programming language from Digital Mars, and decided it was time to write down my thoughts.

D is syntactically in the C family (C, C++, C#, Java) but isn’t an evolution from one of those languages.  Instead, it’s more like C++ redesigned with modern features from Java and C# (and C++0x).

From a C++ perspective, some of D’s features that interest me are garbage collection, modules, anonymous & nested functions, contract programming, and auto type inference.

D compiles to machine code so doesn’t have the overhead of a runtime framework or virtual machine.  The language keeps a lot of C++ features, including multi-paradigm programming, though isn’t fully backwards compatible with C/C++ code.  Although a D compiler can’t compile C/C++ code, a D program can call C and C++ functions, though with restrictions for C++.

So far I’ve been quite impressed with D.  It’s still a very young language, though, and doesn’t have a lot of commercial support or backing.  Only Digital Mars and GNU have compilers for it.  It seems quite popular in open source circles, but I think D really needs an IBM/Microsoft/Borland/Apple to get behind it.

I shall report back sometime in the future after I’ve had a chance to play more with it.


The Return of Software Rendering

September 17, 2008

Courtesy of Slashdot, the following is an interesting interview with Tim Sweeney (game software developer, co-founder of Epic Games, who produced the Unreal engines) where he discusses the decline of the dedicated, fixed-function GPU and the future of software-based rendering:

Twilight of the GPU

Excerpt:

I expect that in the next generation we’ll write 100 percent of our rendering code in a real programming language—not DirectX, not OpenGL, but a language like C++ or CUDA. A real programming language unconstrained by weird API restrictions. Whether that runs on NVIDIA hardware, Intel hardware or ATI hardware is really an independent question. You could potentially run it on any hardware that’s capable of running general-purpose code efficiently.


No soup* for you!

August 8, 2008

* By ’soup’ I mean ‘immediate access’.

Earlier today I ordered a subscription to a software development resource, and the online form claimed:

If you are ordering a new subscription and pay by credit card, you will get immediate access to your online benefits.

Much to my annoyance, however, this is not the case and it appears that they need time to process and complete the order.  Bah!


Hendo’s Law

July 15, 2008

A task that was expected to take 1 hour instead took about 6, mainly due to Murphy’s Law.

Hendo’s Law:

Murphy’s Law sucks.