Windows 8 and The Beach

October 27, 2012 Leave a comment

OK, let’s get one thing straight from the off – I am not referring to ‘The Beach’, the well known book-to-film creation by Alex Garland. Incidentally, it was directed by Danny Boyle, the same guy that designed the opening to the London Olympic games – just after completing a film where someone gnaws their arm off in disappointment. I’m sure I’ve heard that somewhere before.

Anyway, not that beach. But I digress, you’re far more interested in the whole Windows 8 thing, eh? Aren’t you? I mean that’s what you searched for when you got here, right? Good – then I’ll begin:

It’s installed. I partitioned away a little side alley of hard disk space to allow me to start up in imageWindows 7 or Windows 8 – a neat little trick which gives me a fancy blue menu with icons (none of this text based rubbish we’ve been used to in the past). Nothing particularly clever required – simply bought Windows 8 online, downloaded it, burned it to a CD (all of which it did without me having to intervene – Windows 7 will burn DVDs; although, I was told that Windows XP and Vista may require additional ISO to DVD burning software for this bit).

Once burned a reboot caused my PC to start from the DVD and after about half an hour I had a dual boot hard disk with Windows 8 unable to connect to the internet. Obviously, had I not bothered to create this state of dualistic preposterousness, the upgrade of my existing Windows 7 would have been a breeze and my network connection intact.

So, having got over feeling somewhat preposterated, I thought I’d try using the thing image(Windows 8 that is). First things first, I connected my Windows login to a Hotmail account which made everything fantastic – I won’t tell you why, I just wrote it down and it was the most tedious sentence I have ever written – so find out for yourself.

I’m playing music, writing software, writing a blog post, browsing Wiki (honestly, I actually ended up reading about Azure Damsel Flies and then the colour Azure blue – the page was so enticingly rendered before me); Skype’s running in the background and from time to time I have asked Google (with my microphone) to search for ‘Penn Treebank tags’. The latter was a pain in the backside – and not just because of my seated position, but, more importantly, because I had to put on an American accent for it to understand me properly.

A fantastic old book ‘I Seem To Be A Verb’ caught my eye during my web travels within Windows 8. I tried to search for more information with Google – but Google insisted I was looking for a book called ‘I seem to be a…’: ‘phone’, ‘fun’, ‘above’, ‘B of A’, ‘availab’ or a myriad of other quite reasonably abstract things (given the content of imagethe book). Apparently, it’s going around that ‘I seem to be an idiot for not typing the request in the first place’. Which, I have to say, I tend to agree with.

It’s by this chap who seemed to be interested in ‘the sustainable planet’ long before it caught on – if you can’t be bothered to do anything else go to Amazon and request it on Kindle – just to annoy them, who knows, they may do it. Remember, if every trim-tab does it the Queen Mary will change direction – or something like that; although I think it’s just wishful thinking.

Anyway – Windows 8, seems pretty good; and this whole ‘mobile technology’ thing that they have going on with their apps is saving memory and processor time something extraordinary (when apps are not imagedirectly in use they pretty much drop down to no CPU usage – so, I guess I’ll use less electricity and I won’t memory-fault – or something) – it’s also seemingly much easier to understand what’s going on without having to resize windows (everything is full screen by default).

Right – must get on as ‘Time is a Jailer’ and with the music on this loud the ‘Sound of the Suburbs’ will be disturbed despite my double glazing (‘Right Through You’). Finally, in Total Contrast to all that: ‘Takes a little time to get it right, Don’t you believe in love at first sight…’; reminds me of a weird pub in Oslo – or does it?  And on that note…

I’ll be utterly bedgasmed in just a few minutes – and no, that has nothing to do with living in Essex – thank goodness; oh and damn, I was planning to go to the beach today and stand on a groin… Maybe next week.

Advertisements

Something About You

February 12, 2012 Leave a comment

imageAs I sit ‘virtually’ thumbing through the albums of my past on YouTube.com I find myself following an interesting pattern – those tunes made all too familiar to me by way of 6th form ‘ghetto blasters’ of my past are now strewn across you-tube by uploaders all over the world – and I can’t help but mentally revisit almost every 6th form party I ever attended through the memory of these songs.

A little knowledge is a dangerous thing – but as I rejoice in the happiness of my past, looking through the wondrous annals of 1980’s pop: Level 42, Erasure, Bronski Beat, Visage, Ultravox and, dare I say it, Curiosity Killed the Cat; I find my inner technologist briefly considering how all these pop videos have become ‘related’ on You-Tube.

The videos are linked because of the order in which other users have played them – caused by recollections of similar experiences to mine; which is a comforting thought as I pass into my 42nd year – there are other sad idiots like myself wasting time on a Saturday night having only just recovered from a massive 3 pints of Grolsch (such is the heavy-weight I am in the world of championship drinking) from the previous night (OK – there may have been a few glasses of wine too).

This may all be interesting enough to some (I doubt it), but then it occurred to me, on the upside, that there must, equally, be numerous people out there that have happily thrown a party and gathered their favourite 80’s pop to play on a full screen projector and rejoiced en masse at songs that had more to say than your standard Danish/Norwegian pop band of the 1990’s: I think, primarily, of ‘Barbie Girl’ which seems nowadays to have more in common with CBeebies ‘Lazy Town’ – yes we took the format and saw that it was fit for pre-school children audiences only; let’s face it, it’s Sawadee Krahp! Thankfully, I hear it’s becoming common knowledge that, if you speed date, “Did you buy ‘I’m a Barbie Girl’” is a good time saving question to ask if you don’t like the look of someone…

Anyway, I digress, which isn’t unusual for me, so back to the 80’s: as I thought more and more about those happy days of teenage pop bliss, cycling from party to party with my cheap Sony imitation personal tape player, with handlebar clutched in one hand and a small bottle of Captain Morgan clutched in the other, I started to imagine all those less than happy people ‘Fading to Grey’ as they were drunkenly propped up against a luxury flat wall, vodka bottle in one hand life in the other, pouring their heart out about how unhappy their lives are now they find themselves in the ‘future’ and no longer in the happy heady days of 1980’s innocence…

Ahh well, sod ‘em – at least I know why the videos are related…

JQuery Isolation

June 28, 2011 Leave a comment

JQuery

Ever wanted to create a control that could be included on third-party websites? One that smartly loaded up all the JavaScript it needed and execute without any noticeable clashes with JavaScript objects on the third parties web page?

Wanted to do all this and use JQuery as well? Then, as you add those script and CSS tags to their head section programmatically and then include your own JavaScript file that relies on JQuery you find…  runtime errors…

And all because the lady loves milk-tray. No she doesn’t. Well she might. But more to the point your JQuery reliant code must be isolated from the JQuery reliant code on your ‘hosts’ page – as they might use a different version, after all. What a nightmare. How the hell are you going to sort that mess out? Surely somebody who knows the internals of JQuery has taken a look at this, you plead to your coffee mug at 3:25am as you stare out into the darkness of night through the rain covered window…

Thankfully they have. It’s here:

https://github.com/quickredfox/jQuery-Quarantine/blob/master/README.md

I updated it (adding my own extension to the namespace) and including my own CSS and js files along the way. The real clever stuff is the redirection of the callbacks – although, for the most part – if you’re happy to add your inconsequential code to the onload callback in the source file itself, you can ignore the callbacks and the interfaces that go with them completely.

Grab the source and start updating – the A-Team in me says: Works for me! Thankfully a 3 hour bout of depression should free me of such mindless idiocy.

The delights of SqlMetal: Multiple ResultSets from a stored procedure

May 17, 2011 5 comments

Ever wanted to return multiple result-sets from a stored procedure using Linq to SQL? Well I have and, like you if you’re reading this, I found that the default settings in Visual Studio generated code did not allow it. The problem was that the code generated only returned the first result set from the stored procedure. I.e:

SELECT * FROM USERS
SELECT * FROM ROLES

Gave me an IEnumerable return value. Now this just wasn’t good enough; so without further ado here’s the simple code to create a database entities ‘later’ using SqlMetal (a Microsoft authored tool supplied with both Visual Studio 2008 and 2010). First of all, the easiest way to start this tool (as with all Visual Studio tools) is to open the command window within the Tools sub-menu in the Visual Studio section of the Start menu.

Once in try this:

SqlMetal /server:. /database:MyDb /code:”DalEntities.cs” /sprocs /namespace:DalEntities /pluralize /serialization:Unidirectional

…and you’ll find that magically the usual dbml style generated code is produced and placed in DalEntities.cs – in this particular case with all the Stored Procedures included also.

What’s more, as previously said, the tool supports multiple result-sets to be returned from stored procedures. As shown below:

[global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.TestStoredProcedure1")]
[global::System.Data.Linq.Mapping.ResultTypeAttribute(typeof(TestStoredProcedure1Result1))]
[global::System.Data.Linq.Mapping.ResultTypeAttribute(typeof(TestStoredProcedure1Result2))]
public IMultipleResults TestStoredProcedure1()
{
	IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())));
	return ((IMultipleResults)(result.ReturnValue));
}

It’s like magic, I tell ye!  Have fun!

Oompa Loompas, Royal Weddings and Coca-Cola

It seems to have been an age since I last updated this blog; mainly because there wasn’t that much to say (not unusual, life sometimes throws these long repetitive streaks at you, during which the most interesting thing is that the spider that is oft seen crawling eastwards across the floor decides to crawl in another direction; incidentally: if you are really stuck for something to do you can catch that spider and make it crawl Westwards using a thin piece of thread – if you feel so inclined – but you would, indeed, have to be extra-ordinarily sadistic and bored to the point of brain death). Photo 0091

So: many months through the work, home, beer, TV cigarettes and peanuts routine, I ventured out onto the London Underground (that’s a capital ‘U’ there as it seems, now, to be a ‘brand’ – with T-shirts, mugs and maps – lots of maps) and I ran into some Oompa Loompas, as one would prior to coming home to write about it. Picture embedded.

I also notice that there’s been a Royal Wedding (I presume with a capital R & W, although not because of it’s capitalist tendencies… although???). Yes, sitting peacefully on my own throne reading the paper it appears I missed ‘the moment of the century’ – something I was quite shocked about. When did it happen???  Aaaah – I slept through it, I hope it held as much promise and joi-de-vivre as the last one – if not more…

Anyway – this brought me on to the next weird episode, something I had completely forgotten about; something to do with some terrorist – anyway, apparently he’s been caught or shot; not sure which; but it turned out that the president of America is very happy; no, relieved (I think is the official line).Photo 0104

Lastly, I’ve found a new place to live – a little sad as the old place (this place) is still great – but the new place is nearer to the things I love the most. Food and beer, mainly. Which can make an awfully big impact on one’s belly. SO I had better be careful and get fit – it had to happen sooner or later; I would have preferred later.

So, all in all, a good week – except for those Oompa Loompas, where were they going? Why was there only one female and, more to the point, since when has there been female Oompa Loompas anyway, at the last incarnation of them they were all clones of the one Oompa (and had a very unstable relationship with the world of pop music) – which all seemed rather surreal; I presume the underlying message behind the latest ‘Charlie and the Chocolate Factory’ ‘Drugs – just say no!’, which I sort of remember from my days playing arcade machines in the late 1980’s. Astonishingly, though, Coca-cola (despite the rumours one way and the other) does still contain ingredients from the Coca plant (albeit, I stress, a cocaine-free ingredient). Don’t believe me? Well here’s the extract from the Wikipedia entry:Photo 0097

In the United States, Stepan Company is the only manufacturing plant authorized by the Federal Government to import and process the coca plant,[34] which it obtains mainly from Peru and, to a lesser extent, Bolivia. Besides producing the coca flavoring agent for Coca-Cola, Stepan Company extracts cocaine from the coca leaves, which it sells to Mallinckrodt, a St. Louis, Missouri pharmaceutical manufacturer that is the only company in the United States licensed to purify cocaine for medicinal use.

Cocaine itself was dropped from the secret formulae back in 1900 according to this article: ‘Coca Kick in drinks spurs export fears‘. Amazing! Well – on a different topic, my photograph of the Oompas leaves a lot to be desired, I’m obviously not quite at the paparazzi level; but that’s a different story. Instead to finish with here’s some recently married Esso people – they’re living very happily together in a shop window not far from here. I missed their wedding too.

Oh – incidentally, the piano graveyard picture really has nothing to do with this post – but as I didn’t get off my arse to take the picture of the spider running across the carpet recently I thought I’d add my favourite picture of the moment. Who knows, this may become a running feature. But probably not.

Loading an assembly from a specific directory (i.e. when not in GAC)

March 20, 2011 Leave a comment

C# Post HeaderJust like dynamically loading DLLs with C# – at last!

You do not have to put an assembly that an application must use at runtime in the bin folder of the application. You can put the assembly in any folder on the system, and then you can refer to the assembly at runtime.

My preference – which requires no configuration during installation – is to use method 3; just find your current executable’s folder and calculate a relative path from there – ensuring that, even when the app is copied using a standard file copy, it still works on the new server (shedding any deployment requirements with regard to this). See here:

http://support.microsoft.com/kb/837908

Categories: C#

Flowers for Algernon

February 26, 2011 Leave a comment

altFlowers for Algernon (S.F. Masterworks)

Flowers for Algernon by Daniel Keys

Sci-Fi Masterworks Series

‘Charlie Gordon is a floor sweeper’, so the jacket blurb describes. This is not in the same ball park as those standard ‘space based’ Sci-Fis akin to Star Trek. This could well be considered a psychological insight into the ever-changing human state.

In this tale we follow the fortunes of Charlie who, at the outset, is ‘blessed’ with an IQ of 68, well below normal. There’s little to distinguish him from anyone else other than his inability to understand anything more than the ‘here and now’ – and with those around him either despairing at his ignorance or taking advantage of his simple nature there seems to be no real chance for progress.

That is, until he is confronted with the option to be ‘made’ intelligent through a surgical procedure. Without hesitation he takes the option with the assumption it will improve him, such is the engrained belief that everyone else knows best.

Over time he surpasses all around him, including those that performed the experimental procedure. He finds himself able to comprehend so much and yet, at the same time feels completely isolated from all – far more so than when he was a simple floor sweeper who was the butt of all jokes.

This book is not an easy read for the personification of the language itself – at the start this ‘diary’ monologue is that of a man with an IQ of 68. However, as the language improves so does Charlie’s understanding of his situation – and with hindsight he is conflicted by feelings of animosity to those around him for taking advantage of such an innocent; the former him.

Extra-ordinarily architected, this story shows the shifting of a human psyche from a constant to a growing, changing, learning individual who, once capable of objective and abstract thought, is from time to time offended by the routes used to get there. The conflict creates dead ends of thought to be avoided and quickly, as described in the text, the protagonist understands that to be productive, one must be happy.

In numerous ways this book illustrates humanity, from the ‘birth’ of the new consciousness to the ‘nursing homes’ visited towards the end, and all the confusion of love, sex and work between the two.

In short – fantastic. I thoroughly recommend this book – but don’t take my word for it, read it for yourself! 😉

Categories: Books
%d bloggers like this: