Thursday, September 30, 2004

No more ads

Nobody but me will have noticed, but thanks to a tip from md, I've been able to ditch the freestats ad from the bottom of my site. Now, all you'll see is a nice discreet SiteMeter icon on the left with all the other icons. I don't really like them that much, but that's what you get for being cheap. Guess I'm going to have to get me some flair to pad it out a bit.

Coupla new additions

No, I haven't had twins.

I'm now getting my comments hosted by Haloscan. Not for any real reason, but I have discovered that it's far easier to put comments on now than it was with Blogger's comments. You don't have to be a blogger user or anything to use it.

I'm not sure whether it's the Haloscan code or the Freestats code that's doing it, but I get all sorts of privacy alerts and things from IE telling me that all and sundry are trying to download cookies with dubious privacy policies. I don't really like that. It makes me look like a cheapskate amateur. (As if!!!)

The other new addition is getting my site feed sorted out through FeedBurner. It's just one of the ones that Blogger suggests, so I'm going to have a look see how that pans out. It might be good, or it might suck. Either way, subscribe now. Who knows, I might say something interesting one day!

It has highlighted a couple of things that I really need to get sorted sometime soon, though.

1) Get my own webspace. Yeah, it's a bit of a no-brainer, but it's getting incresingly hard to find people that'll do what I want for free. Webmatrixhosting have stopped doing their free .NET hosting, and Brinkster don't support compiled web apps.

2) Register a Domain name. Yeah, for the same reason. I'm getting bored with sending mates really big long URL's and stuff.

3) Some kind of blogging tool. For the same reason again. I guess I'll get into one of the well-known ones, like DasBlog or .TEXT. It depends on how long it takes me to get my arse into gear and get it sorted. Who knows, I might get savageBlog into some sort of workable state before I get any of this sorted, in which case I'll just dogfood that. Who knows.

If anyone's got any suggestions for hosts or blogging apps, then you can be among the first to use my nice new swankyposh commenting system!

Just wanted to share.

Wednesday, September 29, 2004

Read this in a forum today...

And it made me laugh:

"why dose my laptop crash when thay both exactly the sam make model only one is home pc other is laptop"
Exactly the same model, but one's a desktop and one's a laptop, eh? I gotta get me one of these desktop-spec laptops! Or at least get rid of my laptop-spec desktop!

I'm looking forward to ASP.NET 2.0

... And why am I looking forward to ASP.NET 2.0? So that one day I too can say 'Well of course I've been writing ASP.NET apps since 1.0' (pronounced, of course, "won-oh")

Aaahh bliss.

And it means my one marketable skill is out of the realms of just the early adopters (as it seems to be right now in the UK).

Blogging on Demand

I look through my logs now and again to see if anyone's coming to my blog (and find, invariably, that nobody is!) but I think I'll start writing posts in response to some of the searches that lead people to come here. It'll be interesting for me. I've had a look through some of them, and I've learnt a couple of new things that I didn't know about before, so I think that's good!

So. Here's the first one:
"copy arraylist in vb.net" (through Yahoo)

Answer - There are two ways you can copy an ArrayList, which allow you to copy to another arraylist or to an array.

Arraylist.Clone() creates a shallow copy of the Arraylist. What this means is that although the references to objects in the array, regardless of whether they're reference types or value types, it copies the reference to the object, but not the object itself. i.e., if you have an ArrayList of controls, and you call Clone(), you'll have 2 arraylists, and 2 sets of references to the control objects on memory, but you don't create copies of the objects themselves.

The overloaded ArrayList.ToArray() copies the arraylist and all its objects to either and array of Objects or to a typed array, using ArrayList.ToArray(Type). I personally use this one quite a lot. It uses Array.Copy() to create the new array, which (rather confusingly) sometimes produces a deep copy, and sometimes a shallow copy. I use this particularly in collection properties. I generally have a private ArrayList field that contains the objects in question, but then pass an array out through the property getter. Arraylists aren't typed, as arrays are, so I don't want my calling code to be able to add objects of different types to the collection. It's just a personal thing. I don't know if it reaches into the realms of good practice, or what.

So that's my first Blog on Demand. I hope someone finds it useful. I know I did, and learnt me a bit more about ArrayLists, Cloning and copying.

No doubt I'll add more as and when they come to me.

Tuesday, September 28, 2004

Resurrection...

Well, more resurrection of an idea than anything else.

I'm trying to think of a bit of a project to work on for a bit. Obviously, not being able to code for money means that I don't have people coming to me with things they want doing. This post on ASP.NET inspired me to resurrect savageBlog. I figured, since I told someone it would be a cool thing to do, I'd best have a go myself.

I think I'll have to plan it a bit better than last time I tried to sit down and write it. One of the problems with having a lot of dead time (on the tube, in the shower, when Mrs Mawoo's shouting at me) is that I get lots of fancy ideas into my head about what I'd like to do with it. My thinking is that if I've got a plan I can work on it in a bit more of an organised way. Not a groundbreaking realization, I grant you, but still, it took me a little while to go and think about it.

I'll be using my blog to outline the plan as it unfolds, and to track progress. There won't be any specs or anything to start with, and what I do come up with will no doubt change as time goes on, but there you go.

Stage 1:

  • Blog entries stored as XML
  • XSL stylesheet displays blog entries

  • HTML in XSLT links to CSS (How's that for Acronym-tastic!)
I think I'll leave it at that for now. Unfortuantely not only do I have a short attention span, but I don't get to spend very long at any one time sitting at my computer coding right now (bah!) so once I've got that bit sorted (Get the XSD, XML, XSL and CSS written) I'll start building some functionality (probably through a WebService, but too early to say...)

I'll let you know...

Oh yeah, and sice the clocks go back sometime over the next month in the UK or so, DotNetRocks won't be on from 2-4 am Saturday morning, it'll be at the much more sociable hour of 1-3 am Saturday morning. Which'll be nice.

Woah!!

Well, I'm back from my holiday. Got a bit of a tan and now I'm just kinda reeling getting back into the swing of things. Washing (clothes! of course I washed!), ironing, going to work, that sort of thing.

I'll write something more when I've caught up with myself a bit!

Thursday, September 16, 2004

Woo Yay and Thrice to the Hoopla

I'm off to Skiathos on me hols tomorrow. Best get packing!

Wednesday, September 15, 2004

The same 2 questions

I spend quite a lot of time loitering about the ASP.NET forums. One of the things I've noticed is that there are 2 issues that come up over and over again:

1) How do I disable the user's back-button/do some action when the user closes the browser/some other client side stuff?

2) How can I lay out my controls/display something in x way/some other HTML thing?

In case anyone actually reads this, here are the answers:

1) There's nothing you can do through ASP.NET that can do client side things. ASP.NET is a server-side technology. As far as your code is concerned, as soon as a request comes in, is processed and goes out, it's dead. It's a server-side, stateless thing. If your user's browser doesn't ask your code to do something, then it won't even know it exists. I may sound like I'm belabouring the point, but this is quite a key thing to Active Server Pages. It works on the server, not the client. "But what about Session and Application state? How can you say ASP.NET applications are stateless?". Well, ASP.NET does a very good job at mimicing state. For example, it uses a SessionID to link web requests with session objects stored on the server. This is one of the reasons why ASP.NET uses cookies all the time. If you configure your app to use cookieless sessions, then you can even see this SessionID in the URL. Once the request is received, if there's a sessionID, either in the URL or the browser cookie, then the server accesses session variables from that. It's not true state, though. It's just imitated.

"Wandering a bit off topic, aren't you?" Well, not really. The fact that everything is done server-side, including state management and EVERYTHING else ASP.NET does is just to help me make my point. ASP.NET knows your browser is there, it even knows a little bit about it (OS version, Browser version etc. from the standard http headers) but that's all. It can't manipulate your browser, it can't disable buttons, there's nothing it can do to the client.

JavaScript can, though. JavaScript is custom-made for this sort of thing. You want a button disabled based on some sort of criteria? Fine JavaScript'll do it. You want a window to pop up and give your user a message? Fine, JavaScript'll do it (although it'd better be something damned worthwile and relevant. There's a special hell for people who create advertising pop-ups)

2) Control and display layout is all done in the browser from the HTML spat out from your ASP.NET application. I'll repeat that. Control and display layout is all done in the browser from the HTML spat out from your ASP.NET application. ASP.NET outputs HTML. No matter what you've got on your web form, no matter what controls you use, no matter whether they're databound controls like DataLists, DataGrids etc. Your application does what it needs to do, and the spits out a load of HTML to the user's browser. As a result, this means that you have a) ultimate power, but b) ultimate responsibility for making sure your controls work and look right. If it's any consolation, it's not too hard. If you can get VB.NET, C# or whatever, as well as knowing what marked-up code (like XML) looks like, you can get HTML.

There's a million and one fantastic resources and tutorials online, just sling "HTML Tutorial" into google and you're away.

Google is a wonderful thing. As is reading. As is MSDN's library.

Apologies for the rant. Just had to get it off my chest.

Bugger

WebMatrixHosting have stopped doing time-unlimited free hosting.

Anyone know of another? I use Brinkster as well, but the only problem I have is that it doesn't support compiled application dll's - the whole site has to be written in inline code. Which I don't really like (apart from anything else, it's unsupported in VS, so it becomes just a very very expensive version of Notepad!)

Bugger.

Tuesday, September 14, 2004

Well that's alright, then (I think)

I've just read this article about Visual Studio 2005 Standard Edition. This seems to sugest that VS 2005 is going to have a cut-price, slightly limited functionality cheapskates version, without having to resort to the Express edition.

There are several reasons why I think this is a good thing, First and foremost is that, although I develop for fun, writing things that I find interesting, rather than things I have to write, and all that, I would one day like to do it for money. My perception of the express edition dev tools is that they're quite a bit different to VS in how they're used, as well as what they do. If i have a limited functionality version of VS that works the same, just has less features, then I can move quite smoothly rfom one version to the other.

The second reason is that I use some of the things that (I gather) you can't do in a single express edition product, you have to download and use more than 1 simultaneously. For instance, there have been a few times where I've developed a web app in conjunction with a smart-client app as well as a backend class library. That's where it gets (I think) quite fun. As far as I know, I wouldn't really be able to do this so easily in the express edition products.

Yes, yes, yes. I'm the first person to admit that I haven't used any of the express tools. I don't know first hand what I'm talking about. I'm just going from what I've read. If I'm wrong, then please, someone let me know.

When I heard about the Express ed's, I was a bit concerned that it would mean the death of the affordable version of VS, which I was a bit upset about. I'm feeling a bit better about it now.

Just wanted to share.

Thursday, September 09, 2004

Rainy Day

There's some more stuff online that looks to be packed out with stuff it would be good to know from Dev Days 2004.

Just need to wait for an excuse to spend an afternoon in front of the computer...

Wednesday, September 08, 2004

Amusing book review

The reviews for this book made me laugh. Especially the guy who declares Michael Moore's an utter FREUD. What, Michale Moore is, in fact, the father of that rather hokey psychoanalysis thing? (Don't even get me started on Phycho-bloody-analysis!).

Anyway. Made me chuckle. I'm writing Stupid White Men at the moment, and while quite enjoyable, the statistician in me thinks 'yeah, right' to all the numbers, and the part of me that balances arguments and thinks from other viewpoints thinks 'but...'.

That is all.

Tuesday, September 07, 2004

More free stuff

MSDN has another long series of webcasts that started last Friday.

As usual, I'll have to wait for the re-runs, sadly they're always live when I'm at work, but hey, it's all good - and I won't miss anything if I go and make another coffee half way through.

Friday, September 03, 2004

Hey cool...

Windows Media Player 10 is out to download. I'll have to give it a whirl.

It'll be interesting to see whether or not it still likes the app I wrote for WMP 9. If it does, then that's All Good, and if it doesn't, then it'll be interesting to find out why. Either way, it looks like quite a cool thing.

Depending on just how much the back-end stuff's changed, I might even have a stab at doing something else with .NET working with WMP. ASP2WMP and MediaTagger (which was a little app I made for batch-adding MP3's to WMP's library) were kinda fun to work on. I think I might do a couple more.

Just wanted to share.

Wednesday, September 01, 2004

Fight... Fight... Fight

Rory Blyth seems to have a knack for hitting nerves and starting fights.

Just wanted to share. DotNetRocks, however, rocks.