Bloggin in the UK RSS 2.0
 Thursday, April 16, 2009

I found a this great analogy on how MSMQ works

URL : Full MEssage


"MSMQ works similar to how USPS works.

 

You write your letter, write in address (queue format name), attach stamp and put it into your mail box with raised red flag (send the message using MSMQ).

Your mail (message) then sits in this mail box near your house (outgoing queue). Note at that point you can get address wrong on your letter (bad format name), however that won’t stop you from putting letter into mail box (sending it).

OK, so later one mail man comes (network connection is established). Mail man picks your mail (MSMQ connects to the destination server) and if everything is OK it goes through the system (network) and ends up in receiving mail box (destination queue). Recipient (your application on the server) don’t have to be near (don’t have to be running) this mail box (queue) for mail to arrive.

At some point somebody (your application) opens mail box (application on the server reads from the destination queue) and gets mail.

What could go wrong here? Well, you can get address wrong. Mail man can never come (no network connection on device). Destination might be inaccessible, say avalanche blocked the roads (server is down or no network path to it) or there’s civil disturbance and it’s blocked out by the police (firewall or security configuration prevents connection to the server).

Another thing: I’m not absolutely sure, but you might have to install web server and configure MSMQ ISAPI DLL for SRMP to work."

Thursday, April 16, 2009 8:07:06 AM (GMT Standard Time, UTC+00:00)  #    Comments [1] -

 Friday, February 20, 2009
For your enjoyment a ringtone of the Southern Service to Ashford International, oh the automated announcement goodness.
Warning this may confuse your fellow passengers unless you happen to be on that train to Ashford.

AshforInternationalSpeed.m4r (192.71 KB)
Friday, February 20, 2009 3:34:10 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -

Before you let Steve Job's and his posse firmly place their arm up your back passage here's a few things you should know.

Firstly Apple have effectively fitted the iPhone with a chastity belt, if you want to have your wicked way with it you will have to Jailbreak it first, if you don't the following is a list of things you will have to put up with.

1 - You'll have to pay for custom ringtones and you can only choose from the songs / tones available on iTunes.

2 - If you want to make use of App Store and download apps (even free ones) you will have to setup an iTunes account, you will need a credit / debit card and have at least £1.50 in your account.

3 - If you want to load your own mp3's (not purchased via iTunes) you will still have to install iTunes to do this.

I have only had the phone a short while so  there may be more gotcha's to come.

Update:
It turns out iTunes is lying about No 1. you can use itunes to convert mp3 / Wav files in to AAC then rename the extension to M4R, reimport the file and it will appear as a ringtone.
+1 for it being possible -1 for lying to your customers Apple

Friday, February 20, 2009 1:55:11 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -

 Sunday, February 08, 2009




I bought one of these a couple of weeks ago, to use on my commute to london.

The Good:
  • Uber convienient have BB on the move
  • Signal on the train is good without to much drop out.
  • You can plug in a 4gb mcro sd card and turn it into a memory stick
  • In a good signal area the downloads are fast 170kbps
The Bad:

This is a relatively expensive way to roam the WWW at 15 quid per GB but it only costs 39.99 to buy and you only pay for what you use unlike the pay montly alternatives. Perfect for me as I will only use it for small periods.

The Ugly:
The vodafone software that installs when you plug the device in to your Pc/Laptop is possibly one of worst programs I have had the misfortune to encounter in a long time.
If you plan to use this device whilst stationery and in a good signal area you will not have any problems. If you use it on a train / in a car then expect constant pop-ups that cannot be minimized.

The unecessary:
Adult Content Blocking is on by default, included is Skype.com ???
WTF Vodafone since when do Skype serve adult content.... Hmm they do however offer internet telephony, I wonder if that could be the real reason.
Which ever knob jockey at vodafone thought up this trick should be shot. It just annoys paying customers who can download skype the moment they are connected via WiFi, seriously misjudged move by Vodafone.

Update: Tip
You don't have to use the crappy vodafone software, after you have installed it open network connections and right click on the Vodafone connection and select connect. It is also possible to prevent the vodafone software from launching when you plug your dongle in, just go to the options in the app. The only thing you lose is the usage meter.

Sunday, February 08, 2009 10:37:21 AM (GMT Standard Time, UTC+00:00)  #    Comments [2] -

 Thursday, December 18, 2008

If you are using Sql Server 2005 straight out of the box on 32bit Windows 2003 / 2000 and you would like Sql Server to be able to address more than 2Gb of RAM you have to enable AWE.


http://msdn.microsoft.com/en-us/library/ms190731(SQL.90).aspx

Thursday, December 18, 2008 1:55:21 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
SQL Server
 Thursday, November 13, 2008

I have decided to put a shed in the garden this is an account of what was involved and what the various bits cost.



Here she is a 5m x 5m Conrad from Factory Cabins Direct. She cost £2300 inc vat with 44m thick walls and double glazing and took about four weeks to arrive. I notice the price has just gone up to £2700. The shed arrived on the back of a truck with a Hiab crane, the driver was able to hoist the pallet off the truck an on to our drive. As you would expect the pallet was about 5m long and 1m high by 1m wide.





Leveling the site and running services to the shed

I found man with a digger who came and spent a day leveling a 5.0m x 5.0m site, he also dug a trench and laid an armoured cable and water pipe from the shed to the house, for this he charged £180. I wasn't able to be on site when he was working which was a mistake as he did not do a great job of leveling the site. I should have put up some visual markers for him to work to.

UPDATE:



The shed is up and part painted, it took about 10 man days to get to this stage.
The biggest lesson I learned was that it would have been much better to do this in the dry. A couple of times water got into the roof and floor boards causing them to expand and lift.

The total cost of the project worked out at five grand. About a thousand for the concrete base which required 10 tonnes of concrete due to the gradient. 800 for the cedar shingles. The rest went on paint, electricals fittings and fixings.
Thursday, November 13, 2008 10:34:05 AM (GMT Standard Time, UTC+00:00)  #    Comments [2] -

 Monday, October 13, 2008

I needed to automate the upload of csv files to an SFTP server for print fulfilment. It was a bit trickier than I thought it would be so I recorded what I did in case I need to do it again someday.

1)     Download and install WinSCP from here: http://winscp.net

2)     Create a folder where files will be uploaded from and a sub folder called Archive

3)     Open WinSCP go to Options Select Storage and Set Configuration Storage to INI file (WinSCP.ini), close WinSCP.

4)     Add a the PATH to the WinSCP install folder in the Environment Variables

5)     Create a file in the upload folder called SftpScript.txt

6)     Create a .cmd file and add the following command, modify the path to SftpScript.txt

      winscp.com /console /script=C:\Files\PrintFulfilment\SftpScript.txt >> SftpUpload.log

7)     Add the following code to SftpScript.txt, update the parameters highlighted in red.

 

# Automatically answer all prompts negatively not to stall the script on errors

option batch on

 

# Disable overwrite confirmations that conflict with the previous

option confirm off

 

# Connect using a password

open user:password@ftp.somewhere.com

 

# Force binary mode transfer

option transfer binary

 

# Change to home directory

cd

 

# Upload the file to current working directory

put C:\Files\PrintFulfilment\*.csv

 

# Disconnect

close

# Exit WinSCP

Exit

 

8)     To prevent the same file being uploaded next time the command runs add the following to the .cmd File, updating the file mask and archive folder path.

 

MOVE *.csv C:\Files\PrintFulfilment\Archive\

Monday, October 13, 2008 4:48:43 PM (GMT Standard Time, UTC+00:00)  #    Comments [2] -

 Monday, September 29, 2008

I have recently changed job, I have moved from the relative safety of Tradeweb to Wonga an 18 month old startup. It's a very exciting place to work offering a very dynamic working environment.

The company is very focused on becoming the number one source of cash on demand. It offers cash direct to your bank account with in a few minutes of being accepted if you apply before 3pm. This presents a lot of challenges as nearly all customer scoring and verification has to done automatically.

The service is for people who need to borrow a small amount of cash for a short period of time (up to 30 days). It is only designed for use in emergencies. If you are accepted for a loan and repay on time your Wonga Trust rating increases and so does the amount you may borrow.

It's good to be back in a small company where I feel I can make a difference.

Monday, September 29, 2008 1:17:28 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -

 Saturday, September 20, 2008

Every now and again I stumble across a tool that does exactly what I am looking for no if's or but's just exactly what I need. It is a rare moment and something to savour.

Today it happened and the tool is Microsoft's Log Parser. This is a tool that knows how to read IIS and Windows event logs out of the box, it allows you to specify filters and columns using a SQL-like syntax and dump the result straight into a SQL server database. How freakin amazing is that! To build this yourself would involve writing scripts that use WMI or .NET to interrogate the logs then produce text files in a BCP friendly format then shelling out to the BCP utility to import to a DB, in other words lots of work. This can now all be achieved in one line of code:

LogParser -i:EVT -o:NAT "SELECT * INTO c:\Output.txt FROM System"

The example above takes all the fields from the Windows System Event Log and places them into a text file called Output.txt. Once you have installed Log Parser you can copy that line of code into a command prompt on any windows machine and if you have the necessary permissions you will dump the entire system event log to a text file. It's quick too I processed ~2600 log entries to a text file in 0.7 secs on my laptop.

I am still investigating all the features, if you specify the SQL output format -o:SQL you have either to setup a DSN to your database or supply the Sql server & database (if using Sql Auth you also need username & password). After the INTO you specifiy the table name, when the command executes if the table does not exist it will be created for you using the columns in the input format. If want to import into an existing table the column names, data types and order of columns must match. Read the excellent help file that comes with the install. See the example below.

Finally there is one more cool feature I would like to mention, if you wish continually upload log entries from a log file as it grows but you wish ignore records you have already processed you are in luck! Use the iCheckPoint parameter and Log Parser will create a file where it stores the position it last read up to in the log file you are processing. This removes the need to clear out the database and reload everything which means a lot less horsepower will be required for processing your logs. You can reduce the intervals between log uploads to make your database more current.

It also has a Com+ api so you can call it directly from C# or VB. I can't believe it took me this long to discover such a useful tool.

SQL Server Example:
LogParser -i:EVT -o:SQL "SELECT * INTO EventLog FROM System" -server:Laptop\SqlExpress -database:Keeper -driver:"SQL Server" -createTable:ON

UPDATE:
If you have IIS set to create Daily log files (the default) then a bit of code is needed in your batch file to determine what the current filename will be. The following example will work on an XP/2003 server that has is local date format set to the UK. If you are deploying to a server with US date format you will need change code that sets the CurrentLogFile variable.

REM Use on servers set to UK date
SET CurrentLogFile=ex%date:~8,2%%date:~3,2%%date:~0,2%.log

REM SET the path to the IIS Log Files Folder. NOTE: If your IIS server has multiple Websites you may have to change the path.
SET LogFilesFolder=%SYSTEMROOT%\system32\Logfiles\W3SVC1\

ECHO Attempting to process IIS Log File: %LogFilesFolder%%CurrentLogFile%

PAUSE
LogParser -i:IISW3C -o:SQL "SELECT * INTO IISLog FROM %LogFilesFolder%%CurrentLogFile%" -server:Laptop\SqlExpress -database:Keeper -driver:"SQL Server" -createTable:ON
PAUSE

Update: Found a Gotcha
I discovered a gotcha with using the flag -createTable:ON when importing IISLogs into SQL server, this will set the column length to 255 max. Often columns like csReferrer, csUriQuery, csUriStem and csUserAgent will exceed 255 chars. To fix this problem simply increase the length of the columns.
I used csCookie: varchar(5000), csUriQueryString: varchar(5000), csUriStem: varchar(1000), csUserAgent: varchar(1000)


Saturday, September 20, 2008 7:28:36 PM (GMT Standard Time, UTC+00:00)  #    Comments [1] -

I am a big fan of Mark Steel's, I loved the "Mark Steel Lectures" series that he did for the Open University. He is very good at explaining ideas in plain english, de-jargonising them and adding touch of humor to the learning experience. The majority of the series seems to be on you tube, just search for his name and you will find them.

In his latest book he talks mostly about the last ten years of his life, the birth of his two kids, his split with his partner and the end of his membership of the SWP. If your thinking what's so interesting about that well i'm 35 year old and he is 46 so I am just about to go through what he is talking about in his book (hopefully not splitting with my wife and I'm not an SWP member). My wife is eight months pregnant with our first child. The book is honest and amusing and very reasuring that my complete lack of preparedness for becoming a father is the norm.

The book is an entertaining read and well written, I took it on holiday and it only lasted three days a good sign for me. I don't share Mark's views on Capitalism but enjoy reading his arguments, which do have merit because they are well thought out.

4/5 for me.

Saturday, September 20, 2008 9:29:14 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -

Archive
<April 2009>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010
Charlie Barker
Sign In
Statistics
Total Posts: 169
This Year: 11
This Month: 2
This Week: 0
Comments: 77
Themes
Pick a theme:
All Content © 2010, Charlie Barker
DasBlog theme 'Business' created by Christoph De Baene (delarou)