Thursday, April 24, 2014

Comparing asp to

Oh the Joy of .net and object orientation in general:


Compare the old asp way.   Just functions with single return values:



if rules("isafirstname",firstname) = true and rules("isasurname",wholename(0)) = true then

     transmute =("L-CAPNAMEINIT{_}"&propercase(firstname)& " " & propercase(wholename(0)))

elseif rules("isafirstname",firstname) = true then

     transmute =("L-CAPFIRSTNAMEINIT{_}"&propercase(firstname))

end if


So I would wind up stuffing a load of data into the return string and then reassembling it in the calling function.


First go on Tuples today.  Seems to me a sort-of “quick fire” multi-return type where you don’t want to go the whole hog of returning a struct.


Dim foundRows = boysnames.Select("name = '" & Replace(username, "'", "''") & "'")


If foundRows.Length >= 1 Then

   Return New Tuple(Of Boolean, String, String)(True, foundRows.CopyToDataTable.Rows(0).Item("friendlyname").ToString, "Found in Boy's Names Table")

End If


Return New Tuple(Of Boolean, String, String)(False, "", "")


How cool is that?


If there are any old farts like me still debating wether to go for .net and object orientation in general.  The answer has to be “do it now!”.


Tuesday, April 15, 2014

Day 2 curry

Can be that much better with sambal so cover it with film. Thanks to dave and rosie for that tip.

Sent from my Windows Phone

Monday, April 7, 2014

YouTube suggestions



So everybody bar Tanya uses my account to watch videos.  We use it on the main television too.  Only thing missing from this was a Shark Tank episode but I could not get one to appear pressing F5.


Pinks are definitely Isabel.  Blues are Henry and Green is me.

Distributed Backlink Service

Wouldn't it be great to work together and create a "distributed search engine" with the index spread across thousands of peer...