Thursday, November 25, 2004

pinvoke.net: the interop wiki!

pinvoke.net: the interop wiki!

PINVOKE.NET attempts to address the difficulty of calling Win32 or other unmanaged APIs in managed code (languages such as C# and VB .NET). Manually defining and using PInvoke signatures (also known as Declare statements in VB) is an error-prone process that can introduce extremely subtle bugs. The rules are complex, and if you make a mistake, you’ll probably corrupt memory.

Therefore, this site is a repository where you can find, edit, and add PInvoke signatures, user-defined types, and any other information that helps us leverage each other's efforts. Think of this as the 21st century version of VB6's "API Text Viewer," a standalone application which used static files such as WIN32API.TXT as input. Did you spend hours figuring out how to successfully define & call a given unmanaged API in managed code? Share (and get credit for) your discovery here!

Calendars.Net: Free Interactive Web Calendar Hosting

Calendars.Net: Free Interactive Web Calendar Hosting

I've just started using this for maintaining a web based calendar. Mine's password protected, sorry :-)

Check it out though, it's a pretty cool app, no ads, works well. I've only got one quibble at the moment, which is that I can't specify my timezone, it thinks I'm in the US, but the only effect is that it highlights the current day wrongly, which is pretty minor (as you see a monthly view anyway)

Monday, November 22, 2004

Primate Programming(tm) Inc

Primate Programming(tm) Inc

omg, my job is toast... Primate Programmers are going to eat my lunch :-(

Sunday, November 21, 2004

Rent Microsoft Office XP, Microsoft Office XP for Rent, Office Application Hosting for as low as $39.95/month

Rent Microsoft Office XP, Microsoft Office XP for Rent, Office Application Hosting for as low as $39.95/month

What's this thing? It's a way to access Office XP as a web based app, served up via citrix. This means, it'll look and feel as though it's on your computer, but it isn't; it's running on eserver.com's computers, it can save remotely or locally, and it can still print to your local printer.

It's a bit pricey I guess (approx A$600/yr) but hey, you always get the latest version of word, on any machine you use, with your files at hand (assuming you choose to save them in your eserver.com remote drive).

I'd really like to find a free or very cheap office suite (at least a word processor) served up over the web, but this is a start, pretty good for small businesses I think (especially if you trust eserver.com), and a sign of things to come...

Carlton Draught - TVCs

Carlton Draught - TVCs

You may have seen the legendary Carlton Draught Canoe ad, but have you seen the other one? See two of the funniest ads by clicking above!

Saturday, November 20, 2004

Web Guy

Hot damn, but I am sick of desktop apps. It's a pity, because most of my professional life is spent in building them. I am coming to the conclusion that good web based apps are better, though, because they are available everywhere.

Yes, but what if I don't have an internet connection, you ask? Well, I answer thoughfully, get one, are you some kind of retard? I think we're past the point where I can assume that every computer (and lots of other devices) has a 'net connection, except if it's used by some stupid loser in which case I couldn't care.

Ahem, well, here is a short list of ridiculously useful web apps:

- Google, search engine www.google.com
- GMail, best web mail gmail.com (need an invite? Ask me for one)
- WebMessenger.msn.com, web based IM WebMessenger.msn.com
- Net2FTP, web based FTP client www.net2ftp.com
- photobucket.com, free online photo hosting photobucket.com

GMail is also useful for contact management and as a general knowledge base

I'll add more as I find them. What I'd *really* like is wordprocessing & spreadsheeting


Commodore EXECUTIVE 64

Maybe you never heard of the executive model of the commodore 64? Otherwise known as the SX-64, check out this *real* ad:

Commodore EXECUTIVE 64 Image

I just had a daggy TV based one (that's where I first started coding).

btw, if you are a geek like me and want the spec, find it here:
Secret Weapons of Commodore

I can't see any mention of a battery; I think they must have hidden the poolside extension cord in the ad...

btw, they are going for about US$100 on e-bay... go buy one now!

Wednesday, November 17, 2004

Billberry School

Billberry School

My daughter is trying homeschooling at the moment (because school sux man), with my wife Jodie as teacher (oh no not the T word!). Jodie has started a blog of their efforts (named "Billberry School" by her pupil), on which the first tentative progress was made today, by publishing the first post. It's a link to a site explaining why gifted kids are often the targets of bullies.

This should be an interesting blog, as more of Jodie's ideas about teaching gifted kids are published (most likely including reports of success or failure of approaches). So watch this space...

Fast String Append in Delphi

I don't normally put code in this blog, but bear with me on this one, it's a good one!

I needed to append a lot of strings together really quickly; I was sitting in a loop, getting strings from another function, and appending them to a result string. These strings weren't small, and the loop was going round 20,000 times; the operation took 10 minutes. Blah. There must be a better way.

I built the class below, and implemented using it. Now it takes about 2 seconds. Fantastic!

It's a simple thing, but pretty damned useful if you are building up big XML as I was.

Here it is:



TFastStringAppend = class
private
arrchar: Array of Char;
flength: integer;
fcapacity: integer;
function GetResultString: string;
public
constructor create;
procedure Append(astr: String);
property ResultString: string read GetResultString;
end;

{ TFastStringAppend }

procedure TFastStringAppend.Append(astr: String);
var
newlength: integer;
begin
newlength := flength + length(astr);
if newlength > fcapacity then
begin
fcapacity := round(newlength * 1.5);
setlength(arrchar, fcapacity + 1);
end;

strpcopy(@arrchar[flength], astr);
flength := newlength;
arrchar[flength] := char(0);
end;

constructor TFastStringAppend.create;
begin
setlength(arrchar, 1);
arrchar[0] := char(0);
flength := 0;
fcapacity := 0;
end;

function TFastStringAppend.GetResultString: string;
begin
result := pchar(@arrchar[0]);
end;



You use it as follows:



function GetAReallyBigString: string;
var
fsa: TFastStringAppend;
begin
try
fsa := TFastStringAppend.create;
// fsa is initialised holding the empty string
for t := 0 to 19999 do
begin
// function SomeFunkyString(i: integer): string;
fsa.Append(SomeFunkyString(t));
end;
// and here's the mighty result string!
result := fsa.ResultString;
finally
FreeAndNil(fsa.free); // FreeAndNil is in Sysutils
end;
end;


Friday, November 12, 2004

Iconwars

"Did you ever wonder what your desktop icons do when you're not looking? You can click on the link to the website below and find out that when you're away, the icons do play. "
Iconwars

Funny, and it takes about 1 minute. Requires sound. Have a look.

Thursday, November 11, 2004

Manual for SNAIL SHELL SYSTEM

Manual for SNAIL SHELL SYSTEM

Subtitled: Living in a rain water tank, or wtf is going on in denmark???

MSN Web Messenger

MSN Web Messenger

I just found a new version of Messenger, "MSN Web Messenger". It's web based, zero install. A bit slow when you first load it, but it comes good. Kicks butt!

You lose some stuff, like no tray icon to tell you when people come online, and no flashing titlebar on the taskbar when people talk (although you still get the sounds). Also, first time startup is slow even over broadband. Once it gets going it's fine.

But overall very much like standard messenger, without all the crap of installation; just access it from anywhere. Bear in mind it's in beta, likely to change. Nice stuff!

The only thing I have a real concern with is that I usually use Simp to encrypt my messenger communication (www.secway.fr, and look for the free version for personal use, Simp Lite, it's excellent!), because normal messenger communication goes out in the clear to Microsoft's servers and back. I don't think you could encrypt web based messenger traffic.

But I'm not nutso about encryption. I can install normal messenger on machines I regularly use and also install simp, and live with in-the-clear messaging when I use other boxen. That'll be ok.

But really, I'm raving at this point. Go try it out!

Monday, November 08, 2004

The Drive to write Free Software

The Drive to write Free Software, by Charlie Calvert

A wonderfully high minded piece about why people write free (liberated) software. The open software movement is a beautiful thing which I want to be a part of some day.

Wednesday, November 03, 2004

PHLAM

PHLAM

My good mate Jon now has his own blog, check it out... it looks promising. Especially, I'm sure you'll see a lot of google-related goodness there, such as the add-on to google desktop that he's linked to (see November 03 2004 on his blog), which lets you choose file types to index. Personally, I thought "yes, I can google my codebase, right on!".

Soooo busy

I've been really slack about blogging recently. Suffice it to say, I've got a new job and I'm run off my feet. I'm certain to get my head above water some time in the near future.

btw, hello to anyone whose come here via emlynoregan.com . My main site is down at the moment (rebuilding machines in my non-existent spare time), so it'll come back eventually, meanwhile here's my blog, enjoy the silence!!

I'm tempted to blog something about how to live (mostly an antimaterialism diatribe, I'll predict) so this may turn up in the near future.