A Fresh Start!

Well, after a couple of false starts I’m finally back on the grid for good! Those who know me will know why I’ve not been around due to various personal issues, but I’m back with loads of stuff and hopefully some nice regular entries. Note my new blog theme & fresh new look! I’m now on the grid good and proper , fully twittered up ( @nCodeRob ), and I’ll even start adding to my unused Facebook account – that should at least keep the wife out of my hair!

Since I’m passionate about photography as well as this computer m’larky, I’ll be uploading photo’s I take, both from my DSLR (when I can be bothered to carry it!), and from my iPhone which is proving surprisingly versatile for 5mpix.

Wow. Its all happening, watch this space. My writing bug is well an truly back.

  Copyright secured by Digiprove © 2010 Robert Hill

Posted in Personal | Leave a comment

iPad…I HAVE.

Well, I’m now the proud owner of an iPad. I was expecting big things but damn, not this big. It’s pretty much changed how I spend my compute-time. My main pc is used solely for development now, and everything else, and I mean *everything* else is done on the pad. Email, all browsing, all reading, doc creation even my company invoicing..the lot. Form factor, battery life ( that’s just amazing to say how long I use it each day!) are fantastic. The apps are slick, responsive and you really don’t seem to care about the odd minor missing feature, which totally supports the aesthetic usability effect more than I would have thought possible. Maybe people really do think that well designed things work better whether they do or not. The downside is now having to go back to something that you have to manipulate using a mouse. It’s wierd but the first thing that happens when you approach some new tech is that you try to prod and stroke the interface. You end up having to conciously resist the temptation to smear a greasy fingerprint all over someone elses laptop or monitor. Cheers Steve.

Anyway, perhaps we should start exchanging app recommendations!

Posted in Apple, iPad | Tagged , | Leave a comment

iPad iLike

I think i’m seeing the benefit. I’ve looked at the other eBook readers and up to now stuck with the paper on shelves. However, handling the iPad, reading the sample pdf’s and seeing how much it looks , well, just ‘right’ Im beginning to like it more than i should for an overgrown iPhone.

help. I’m being assimilated!

Posted in General | Leave a comment

Whoa. That was a *BIG* break

I think we need a bit of a refresh & a new start. New theme & updates, coming very shortly.

Posted in General | Leave a comment

WordPress Resources at SiteGround

WordPress is an award-winning web software, used by millions of webmasters worldwide for building their website or blog. SiteGround is proud to host this particular WordPress installation and to provide the following resources, which facilitate the creation of WP websites:

WordPress tutorial
The WordPress tutorial at SiteGround shows how and where to actually start creating your blog site. It includes installation and theme change instructions, management of WordPress plugins, upgrade and backup manuals, and more.

Free WordPress themes
The WordPress theme gallery at SiteGround contains a rich collection of free to use WordPress themes. The themes are suitable for any type of blog and are easy to customize for the particular use the webmaster might need.

Expert WordPress hosting
SiteGround servers are fully-optimized to accommodate WordPress-powered websites. Free installation of WordPress is also included in the hosting services provided by SiteGround.

Posted in General | Leave a comment

Dynamic parameters in XPath WPF bindings.

A graphical depiction of a very simple xml doc...

Image via Wikipedia

Since its been a fair while since I posted anything with technical content, I thought I’d lighten the atmosphere with some hardcore XAML extending 😉

I was asked this question a while back, how to parameterize an XPath query in a binding. Well, it is a bit of problem, you know, ranking right up there with global warming, world peace, North Korean space program crisis etc, and like most lazy developer’s (that’s a good thing btw!) I googled first to see what I could turn up.

There were plenty of scams for solving global warming, but not one for Dynamic XPaths in XAML bindings.

Nothing. Zilch. Nada. Zip. There was one post that made me think that it may well be a bit more difficult that I was expecting.

This post by Karl Hulme almost did what I wanted but not quite. it still wasn’t flexible enough to perform the type of binding I wanted to solve this particular problem, which was, to basically externalise rich tool tip data that was held in an external file, so the client could easily update the data to be shown based on control names on a form. The tool tip had to show not only text, but other rich content that was configured from an XML data source.

So after much head scratching, I came up with what I thought was quite a neat solution. Although it doesn’t solve global warming I think it’s quite a neat solution to the XAML problem. It’s a combination of a Value Converter and a Markup Extension, which allows you to specify XPath bound data in a clean way right in the XAML. The tooltip is then templated using these two classes to display the additional content as well as its original content if any.

Continue reading

Posted in General | Leave a comment

Automation for business and pleasure.

I’m a big fan of automating anything that can be automated. Those of you that may know me, might even call me a bit of a fanatic. That’s the reason I got married, automatic dishwasher on the cheap. There’s a reason for my fanaticism, I believe that the more of me you remove from the loop, the less problems will occur. Well, not me in particular, I don’t think I’m that crap. Well, ok, I’d prefer it if you didn’t ask anyone’s opinion on that 😉 Especially the wife.

The largest source of problems in a project is us bumbling humans, and we’re not just talking about the bugs that we introduce!. Damn those pesky humans.

Automate Everything

Ok, so how do we help obsolete ourselves? Build automation is a really good start. As Steve McConnell once said “The build is the heartbeat of the project. If the hearts not beating the project is dead.” If that metaphor’s good enough for Steve, its good enough for me. Automated building is one of the best tools to keep that heart beating.

So, one of the keys to having a project run as smoothly as possible is automating the builds. There are many reasons for wanting to automate the build :

Continue reading

Posted in General | Leave a comment

Correction

Well, not a big one, but one of my blogless friends has pointed out that I probably mean the Real Time scanner – but I’m 99% sure its called the On Demand scanner.

Here’s the courtesy link to his website 😉

Either way, its the one that checks files as they’re accessed.

McAfee.. helping keep files clean, and product deadlines away.

😉

Posted in General | Leave a comment

Epic Battles with McAfee

McAfee, Inc.

Image via Wikipedia

What week, I’ve managed about 4 hours of actual development. The problem? McAfee’s on demand scanner.

It all started Monday, whilst I was writing a templated ASP.Net control similar to the inbuilt Logon panel. The difference was that this control respects the privileges of the logged on user, using the Oracle security model that we’re deep into.

Anyway, on using the panel I started getting unrecognised tag errors, and then Devstudio wouldn’t compile the project. At all. So, after a bit of cleaning and the usual go to the dos prompt, i really cleaned the project and tried again. Success.

All the errors went away. Hmm, i thought to myself. must be some cruft from left from the other day when one of the other office staff mistakenly unplugged my PC instead of the electric heater at her feet. Twice.

Any I’d scan-disked the PC and found nothing wrong so off I went merrily coding away. Then odd little errors started creeping in. Tags not recognised, xml schema errors from files I’d not touched for days. It never occurred to me that the On Demand scanner from McAfee could be the culprit. So after blaming myself first for a day, then DevStudio for a day, I started looking at all the other corporate software that was running on the PC. Keep in mind that it takes a day for this because these aren’t the worlds fastest PC’s (the fast ones are on order 🙂 ).

So finally I examine the McAfee On Demand logs. Holy smoke. over 4000 blocked actions in the last hour. Yes I work fast. Either that or there’s a lot of files making up our project 😉

Not only that, but the file it seemed to be scanning was the .ASPX file i just so happened to be working on. I’ll take that as the smoking gun.

So I think I’ve found the culprit, but trying to sort out what to do about it is a whole different story!

Remember that we’re dealing with a corporate IT department. Can I get rid of McAfee? No. I tried that already. Not enough rights. So I ring the IT department. Waivers for developers? modifications to the policies, different virus killer? No, No and NO. So, I’m kind of stuck here. It’s out of my hands now, but given that I’m on a daily rate, this could be getting expensive, and its only when the costs start mounting up that people notice. Nothing I try seems to stop the interference with VS2008, and meanwhile the project is kind of stood still. I haven’t been idle (of course!) I’ve installed a full automated build system whilst I’m waiting for this to get solved, but that’s in a VM where I can guarantee that its running exactly what I want, not what someone else thinks I need 😉

I’ll keep y’all posted.

In the mean time, might I suggest :

1) Don’t use on demand scanners with development environments. Its not worth the hassle. This is the second time McAfee’s bitten me.

2) if you have to use on demand scanners, don’t use McAfee!.

If only real life development was that simple.

 

Reblog this post [with Zemanta]
Posted in General | Leave a comment

Binding and DetailsView

Since I’m doing more ASP.Net than I’d normally like to admit to, here’s a really useful little snippet that I struggled with earlier. After my google ninjitsu failed me I turned to figuring it out for myself.

Once I’d wiped the sweat from my forehead I came up with a solution. Whew.

Ok, the problem was that I have a typical master/detail gridview & details view on a form which allows the user to select a row in the grid and then edit the details via the DetailsView. So far so good. I managed to get the whole thing hooked up declaratively using ObjectDataProviders so it felt almost like the XAML i know an love 😉

Anyway next on the agenda was the field validation. I’d re-templated the fields on the DetailsView so we’d got DropDownLists showing predefined lists take from the internal DataModel. Life was good. Throw in a few field validators and we’re good to go. Almost.

Since some of the fields on the form were just TextBoxes, I’d added the typical RequiredFieldValidator, but what about the lengths? These text boxes are mapped VarChar columns on the DB, they had an explicit length. I could hand code the length with the MaxLength property but that just means more work should the DB schema change on me.

If this were XAML we’d have it bound up in no time, but all my attempts in ASP failed miserably.

I know that the DataContext – oops sorry (!) – DataItem must be a DataRow from the table the grid was bound to, so there must be a property giving access to the rows columns. Sure enough, there’s the DataRows Table property we can use. Great! Saved! Effectively what I’d like to do would be bind up the MaxLength property to a DataColumns MaxLength propert. Sound simple. something like

<asp:TextBox MaxLength='<%# Table.Columns["GUR_FORENAME"].MaxLength >’>

Not so fast buster. Unfortunately  the above and all variations I tried didn’t seem to work. Even trying to Bind() to the table didn’t seem to work either

<asp:TextBox MaxLength='<%# (Bind(“Table”) as DataTable).Columns["GUR_FORENAME"].MaxLength >’>

Since Bind(“Table”) returns object, i thought i was in there! No such luck. Dozens of variations later, magic incantations, a full moon and some voodoo, I finally managed to get it working.

The final version of the binding expression I was after looked like this :

<%# Eval("Table.Columns["GUR_FORENAME"].MaxLength") %>

I’m still freaked out by the fact the whole expression has to be inside the quotes. If Bind() really does return an object what the hell is it? If I had time to spare I’d reflector through this, but unfortunately after spending too long on figuring out how to bind the max length, it’s something that will have to wait.

So, it looks like the ASP binding is a bit more flexible than first thought, and not surprisingly , the standard examples hint at!

Reblog this post [with Zemanta]
Posted in General | Leave a comment