Mr Pike's Blog

 Diary of an ASP.NET bodger
Stuck

I've been going through Jason Bere's excellent book - Teach Yourself Visual Studio.NET 2003 in 21 Days as a way of re-acquainting myself with both developing and the .NET framework etc. I've been faithfully doing a day at a time, but now... I'm stuck, and apparently its because I'm a smart-arse with SQL2005 instead of SQLExpress.

Day 5 - Writing ASP.NET applications is here.

Learn .NET in 21 days/60 minutes/24 hours....

Can it be done???

Not wanting to blow my own trumpet but I'm fairly clever, done a bit of .NET and kind of know my way around the framework. As you all probably know by now, I've not touched an IDE in 12 months (true) and not even been online in the past year (IT CAN BE DONE!!! YOU DON'T DIE!!!!!!) so surely I of all peeps should be able to fulfull the prediction of these books...

Roll up, Roll up...watch me make an arse of myself lol.

First article is here..

 

Tripping over my own laces.

After almost exactly 12mths of not having picked up Visual Studio (or been online for that matter) I find that

a) I have a ton of email to sort through
b) I can't remember how to tie my own shoe-laces (figuratively speaking)
c) My typing has gone to ratsh*t.

So, without looking at any websites or books, just how far can an extremely rusty developer get using Visual Studio 2005?
Let the bodging begin
http://weblogs.asp.net/dbarrow/articles/remembering_how_to_program.aspx 

Where are your bottlenecks?

I'm sure most people reading this will be aware of the joys of trace.view but I've never *really* got it to show me where my main bottlenecks are. It's just a bit too much like hard work to be honest.

Enter ANTS profiler.
Absolutely superb piece of kit that needs to be in every developers toolkit - whether ASP.NET or winforms. Even those freaky C# guys.

What it does is sit in the background while you run your app, clicking about and emulating the actions of a user.
When you've finished, it opens up a history of activity, the top 100 slowest functions and allows you to actually drill down into the relevent piece of code. There's even a nice little red bar for those really slow calls.

S'very nice. You can get it here
www.red-gate.com If you're serious about tweaking your code, I definitely think its worth it.
However, if you're happy with functions that take 2seconds - stick with the trace :P

Posted: Mar 29 2004, 04:11 PM by Mr Pike | with 2 comment(s)
Filed under:
New article - creating a custom repeater with custom caching and sorting..

A recent requirement was to create a web-page that sorted ascending then descending based on the last sort per column. I could have extended a datagrid to do my bidding but I ended up creating my own system due to some logic that needed applying to one of the columns (If conditionA then bgColor=Red).
That kind of logic was easy enough to accomplish in classic asp but I found it difficult to do to with a datagrid.

The article is here - any feedback appreciated and will of course be incorporated.
Also, if you can tell me how to navigate to my articles, I'd be very grateful lol!

 


Posted: Mar 17 2004, 02:31 PM by Mr Pike | with 15 comment(s)
Filed under:
Designers and Developers can live together.

We've been trying to find a solution whereby the totally none-coding designer works with the crayola wielding developers and the simple "Make a static page with some content" people. Dreamweaver templates are excellent for this but VS.NET makes them an impossible solution.

What happens is the template inserts a comment just below the HEAD tag of the simple html page.

<!-- InstanceBegin template="/Templates/test.dwt.aspx" codeOutsideHTMLIsLocked="false" -->

The designer saves the page, it all works and then the developer sets about making it work. As soon as they open the page in design view, the template is screwed because VS.NET moves the instanceBegin comment to after the title tag

 <HEAD>
  <title>template</title>
<!-- InstanceBegin template="/Templates/test.dwt.aspx" codeOutsideHTMLIsLocked="false" -->

The consequence of this is that Dreamweaver now finds nested editable regions, therefore breaking the functionality of the template 'philosophy'.

http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=457479  

http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=441814

 

http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=391742

 

Now, I'm led to believe that Whidbey leaves your code alone and basically, I can’t progress some kind of totally safe shared environment without that functionality. Dreamweaver is an awesome web design tool - especially when coupled with Photoshop and someone who knows how to use it (If you're reading this, then you aren't one of those people :P )

VS.NET will always screw over your code so while Dreamweaver is the tool of choice for frontend stuff, it won’t work with VS.NET (nothing will as VS.NET html mangles everything). However, code development with VS.NET is 10 times quicker than with any other IDE that I know of so whatever solution we use, it has to be VS.NET compatible, not the other way round.

I've looked at BasePages and they seem cool - John Rebbeck and Russ Neimhausers articles are succinct and clear but IMO its not going from A to B when all you want to do is server HTML with some dynamic content. Surely the fastest served page is control light with pure HTML in - not something that is inherited and processed, and then controls moved here and there to make it fit?

So - Whidbey - is it what I'm led to believe it is? I'll let you know.

 

Posted: Feb 19 2004, 04:15 PM by Mr Pike | with 9 comment(s)
Filed under: ,
Bluetooth - you get what you pay for.

So, I got two bluetooth dongles (Zeevo BT500 stack), plugged them in the old USB sockets and away we go... no?

Bugger. Bluetooth won't work with Server 2003. I did some searching and found Brian Desmonds blog on the subject, but the end result is - bluetooth doesn't work with Microsofts flagship product (which I love btw). Switch to XP Pr - install the software and way we go.. no?

No. The default installation all runs against the LAN 1 connection (of course I already have a lan, i'm a network dude fer crissakes) so with some tcp/ip tomfoolery, away we go.. no?

NO! If the client laptop is not positioned in the absolute correct position, then you lose the signal.
What I wanted was a cheap alternative to a wireless network. I figured - hey, Bluetooth, 10m connectivity, away we go. No. What you actually get is an upgrade to line-of-sight infra-red connectivity - its pants. If someone walks past the two devices, you lose it. Forget about closing doors or through walls - it no workee.

Upshot? Buy wireless. Bluetooth is useless other than for keyboards and mobile phones that are sat within 3inches of the damn host dongle.

 

Posted: Feb 08 2004, 09:42 AM by Mr Pike | with 5 comment(s)
Filed under:
Contract - or work for a living?

Recently, on a list serv that I'm on (Uk webdevelopers - http://www.MsWebDev.org.uk/ ) we were discussing the ups and downs of being a developer. Money came up, as it does, and then the current high rates for contracting.

My own view is that is a short lived affair - and that it will happen less and less. My reasoning? .NET.
Microsoft have got it right now, and I mean properly right. Totally right. Well, maybe a couple of bugs here and there but if you can throw a datalist object back and forth like a tennis ball, in a proper object oriented fashion, and it makes no difference what language its in - surely someone somewhere should be saying "Ok, we give in.You win!"

So, companies are now happy to embrace the .NET framework into their business (or so it would appear from the recent demand for contractors).

However, will that demand last?
Will we see a return to the heady days of constant £500 a day contracts or will (as I suspect) expectations rise and therefore demands rise for increasingly complex web apps?

I dunno, cos I'm off out of it. .NET will be my hobby

Posted: Feb 04 2004, 10:31 AM by Mr Pike | with 4 comment(s)
Filed under:
Powervault 220s, Databases & BACKUPS

Ok. Don't panic but BACK YER FREAKING DATA UP NOW!!!

We have a Powervault 220s which we use half for the mailboxes and half for the main database server. Its on RAID 5, has just had new drives installed and the power supply scrubbed. We also have a well thought out (so we thought) backup solution using tapes and Backup Exec. Anyway, at 3.51pm on Saturday, it all went tits up. The powervault was just dead. Powered off and on again and it came back up but the drives were offline apart from the hotspare. Nightmare. That's like 90% of the business critical stuff. DELL were helpful, but not really much help - they suggested swapping power leads which wasn't it but I'm not getting at Geoff the support dude, I know how hard support can be.

We finally found a solution in the form of this link here
http://forums.us.dell.com/supportforums/board/message?board.id=pv_raid&message.id=214&view=by_date_ascending&page=1 

It would appear that there is an issue with the 220s. Problem is - the powervault doesn't look like a computer and there's no floppy or keyboard.. so the existance of firmware just didn't occur to me. I realise this is poor logic but *it just didn't* ok?? The loing and short of it is that the databases and mailboxes are corrupted. We have backups but it takes forever to restore from tape with Backup exec (6hrs for 16gig of mail... that can't be right can it??) and we lost two tables.

Upshot is I'm revisitng our backup strategy. As well as the backup exec, I think we also need to be doing differentials as well, and full backups to another server entirely so that we can restore to another machine and at least get back to work. And we need to do drills and simulated crashes. Disaster can strike anytime so BACK YER FREAKING DATA UP NOW!!!!

 

Patching

Ok. I'm sure most of you have read some article here or there about MS Patching and RPC exploit, MSBLast.exe etc etc.

As a web developer who also picks up overflow IT helpdesk calls, I can firmly say MS HAVE GOT IT WRONG!
Many of our help-desk clients are computer users, just as I am a car driver. If my carburettor broke, I'd have to get someone to fix it, but I can change my own oil and water, put air in the tyres etc. I know other car drivers though who can't. I also know people who have baths and taps, but they don't lag their pipes, or flush them through with pipe-cleaner every year.

I could go on, but I think you get the picture.

MS need to adopt the stance that there are some users who do not know how to put a URL in the address bar. Their argument might be that there is the windows update icon in the start list and the tools menu, and every now & then, you're forced to go to the update page. I like that, I really do, but techno-phobes DO NOT READ, nor do they comprehend that their badly patched system could help in bringing down the internet, or a power station (!), the Stock Market - whatever.

If some kid from Elbonia can infect your machine with a worm that does a,b,c then surely MS could do the same but in a positive way. The 16th July patch should have been forced onto everyones computers, like it or not. There would be issues with that, sure, like you couldn't put it on Win2k SP2, or NT4 pre SP6. Sometimes, the patch broke Office, which then required imaged machines to have the original install disks. But in the long run, things should have been better.

This time, I think the internet got off lightly. I'm not so sure if next time will be so painless. What if some disgruntled musician hacker decides to attack every machine in the world that has Kazaa on it? What then? And then someone decides to have a pop at people playing Counter Strike, or whatever.

The below snip from MS, aimed at people who are interested in security and are therefore likely patched anyway, is too little too late.

You are receiving this message because you are a Microsoft newsletter subscriber. Please print this page for your reference.
It is very important that you check the Security site regularly for the most recent news: http://go.microsoft.com/?linkid=221015

In This Newsletter:

--Who Is Vulnerable
--4 Steps for Home Users

At 11:34 A.M. Pacific Time on August 11, Microsoft began investigating a worm reported by Microsoft Product Support Services (PSS). A new worm commonly known as W32.Blaster.Worm has been identified that exploits the vulnerability that was addressed by Microsoft Security Bulletin MS03-026.

Who Is Vulnerable?

Users of the following products are vulnerable to infection by this worm:
. Microsoft® Windows NT® 4.0
. Microsoft Windows® 2000
. Microsoft Windows XP
. Microsoft Windows Server(TM) 2003

More Posts Next page »