Showing posts with label General. Show all posts
Showing posts with label General. Show all posts

Tuesday, 4 September 2012

Back from the dead?


This morning I was reading the post Your Words Are Wasted on the excellent blog area of Scott Hanselman's Computer Zen site, and I realised that I've not posted anything to this blog in over a year, and this is probably something I should sort out.

It's not the first time one of my many sites have been in this position, and I doubt it will be the last, but let's have another crack at keeping it going this time (as in having regular updates).

I have actually written several posts since the last time I updated here, however due to various reasons they never made it to the site. Perhaps a couple of them could be salvaged.

Either way, I'll try (once again) to keep this site ticking over. Apologies if you find the content pointless, please don't flame me, just don't waste your time here if that is the case, however if you do see something of interest, that I've mis-understood or got wrong, or have any other constructive comment, please feel free to comment or contact me.

Thanks,

Stu.

Thursday, 15 July 2010

Testing Times

Looks like this is going to be one of those rare blog entries that will live in both my tech and personal blog since I don't know where to put it. I guess that's good. Anyway:

Well, it's week number four in my new job. i have a desk, a machine and I'm just about set up with my development environment. There's a few things I've not been briefed on or covered yet, some of them quite basic (like how about giving me a Jira account, that may be useful soon, or on what branch do these guys do all their development, surely not main_latest all the time?!!)

So what have I achieved so far?

Well, not a lot yet, and it's starting to bother me. I've so far been given a single 2 part task with the aim of speeding up the build tests:
  • Go through a bunch of JUnit tests and remove anything not testing actual business logic (so for exampe if its a persist or retrieve operation, take it out).
  • Investigate getting the JUnit tests to run in parallel.
That's not so bad for a first task on an unfamiliar system.

So I spent just under a day looking at a select bunch of JUnit test code trying to decipher what was and wasn't a business logic test. Sounds quite easy, but since a lot of methods are masking non-business logic, it's very easy to leave them in. Similarly, what looks like a persist operation may be an actual calculation of one variety of another. Then you have the methods that call both responsibilities, or rely on persisted data to pass. It's not as easy as it first looked, especially on an application with which you are not familiar.

The upshot of all this? I came to the conclusion that there probably wasn't any business logic being tested in the set of tests I was looking at. I was, as you might imagine, uneasy with this deduction, it felt wrong and I couldn't be 100% sure my findings were correct, however when I returned to my "mentor" for this task he didn't seem to surprised and commented "I've skimmed over this myself and I didn't see anything leap out either."

Oh thanks.

Actually one thing that did amuse me, I had flagged up one test as possibly being business logic, however as my mentor was looking into this I noticed a section of code that clearly suggested otherwise, so at least I beat him to that one.

With that task out of the way I started looking at making the JUnit tests run in parallel. A little research on the web revealed what was needed (including a version of Spring that's still in RC status). Undeterred I created a small project with a bunch tests to try this stuff out, and sure enough it worked as I expected (albiet without a hint of Spring in sight, unlike the real project). So how did it go once I started applying this new found knowledge to actual project... well I've been on it a week now and I'll be sure to let you know what I find when I finish (if you ask nicely).

I've been hit by numerous issues with my development environment, and on the odd occasion when things do work as expected, a run can take up to 26 minutes (usually closer to 19 for a full run - at least for what I'm covering). The worst thing is I'm only making changes to a handful of POM.xml files and so far the results show no avantage at all. At this rate my findinge will be: "Hey, I've spent over a week and can't get any speed increase". That hardly makes me fell very good and I don't actually feel I've achieved anything yet. Especially when for the most part my day consists of the following routine:

  1. Start machine. Spend 1 to 2 hours getting the build to work properly.
  2. Make a small, well trodden modification to all 4 instances of a command in 3 pom files. (5 mins max, probably closer to 2 mins)
  3. Fire off build and wait to complete (up to 19 minutes if it completes)
  4. Investigate any errors or note timings (2 to 10 mins).
  5. Repeat from step 2 until time to go to lunch or home.
I can't help feeling this should have been finished some time ago. I know deep-down proving something doesn't work is as important as proving it does, but this seems to be dragging now. it feels like my fault, but frankly i don't know how to make it better, it's just the nature of this particular beast.

I guess deep down I feel the need to prove myself as the new boy, and with this task I feel like I'm coming up short, rightly or wrongly. Oh well, I guess that could be me worrying too much. Sometimes, that's just the way it is.

Wednesday, 14 July 2010

Evernote

Whilst at EvaluatePharma I was singing the praises of OneNote from the Microsoft Office suite of applications. This, especially on a Tablet PC, is a superb piece of note taking software recording audio along with text or handwritten scrawls if you have the hardware. OneNote can take an image and find text within it (so for example you could photograph a business card, add it to OneNote and later a text search that happens to contain any information on the card will bring it up as one of the results), and being part of the Microsoft Office suite, it links quite nicely with the other apps as you'd expect, and takes web clippings from Internet Explorer too.

Amongst the myriad of other features I also found the collaboration side of OneNote to be excellent, specifically I could open a OneNote notebook from a network drive on my PC, edit it, and it would automatically sync next time I opened it on my laptop. If I was working with a notebook whilst disconnected from my network, when I got home it would sync changes and these would replicate over to other devices. With the advent of Office Web Applications this can now be done over the internet too, and editing can take place within the browser with no need to install or even own a copy of the desktop application.

OneNote is frequently considered the hidden jewel of Office by those who have used it, indeed a while ago it featured as the only Microsoft product in a list of top 10 essential applications that was heavily dominated by open source and free software.

The major downside with OneNote is that the office suite used by many companies is out of date or does not include the app, and I suppose the fact it is not free.

Step-up Evernote (http://www.evernote.com). Evernote is one of the many alternatives to OneNote, and the one I use most regularly. Evernote comes in two flavours, free and paid for. Both use the same client software, both store to the Amazon hosted cloud, the main differences are the amount of traffic you are allowed per month, and the file types you may attach to your notes.

Evernote may be run from a web browser, or clients exist for several of platforms (Windows, MacOs X, iOS, Android, Blackberry, Windows Mobile, Palm Pre/Pixi). No matter what metods you choose, Evernote can sign into the central repository and synchronise your changes between the various clients. Evernote also implements several pieces of functionality found in OneNote, for example finding text in images (which is scanned on the server; paid users having priority in the queue, but this has never been an issue for me).

There's lots of stuff OneNote does that Evernote doesn't, and a few features in Evernote that I'm not aware of in OneNote (for example I tag notes extensively in Evernote). Best of all, because the clients are free I've installed them at work where I can, and use the web version when this is not possible. And because Evernote isn't well know like, for example SkyDrive where OneNote stores its web shared files, it's not blocked by as many corporate firewalls yet.

The free version has been ample for my needs (I've never used more than 3% of my monthly data allowance, despite using the tool extensively) so it's well worth a try even if you do have access to OneNote.

Of the two, OneNote remaind my favourite, however Evernote is currently used far more often. It's well worth looking at.

Friday, 9 July 2010

Willing to drift?

As if the love-in for Apple devices at BP isn't enough, I recently watched a guy on my train home using his iPad as an eBook reader. This got me thinking "I could be tempted by an Android slate" (see earlier posts for why iOS and Windows Phone devices are not on my radar).

The is remarkable for me as only a few months ago I would not have entertained this thought at all, in fact I was only interested in running Windows 7 on a tablet. I have to admit my ideal device would still be this, but the swish iPad equivalent hardware for PC devices is, I fear, still some time away.

I loved my tablet, but it was too bulky, too underpowered and the screen was too dim/fuzzy due to the touch functionality. However. technology moves on and now all of these issues have now been solved, but strangely not in one device.

Touchscreens are now much clearer and more vibrant. The mobile versions of the Core chips and similar offerings from AMD are very capable. Laptops, whilst not as light as an iPad also weigh much less now. And the deal maker or breaker for my next purchase will be battery life (I had too many occasions with my last tablet where it died half way through a journey home).

I had whittled my choice down to either an HP tm2 tablet, basically an updated version of my current (very sickly) tablet, or an Acer 5820 with an almost 7 hour battery life and Core i5. Out of the two the Acer is a more powerful machine, but lacks the touchscreen, if only they had included this I'd have had the credit card out last week instead of still plucking up the courage to part with my cash.

And that's my point; why is it so hard to put a touchscreen on a decently specified machine? I know it's going to add to the price, weight, and you have to design in the hinge, etc., but it's surely not that difficult is it? Who is going to be the first company to step up to the mark? It's a problem that's been commented on for an age, and now just seems to be accepted: "It you want a tablet or slate you must sacrifice power and other features". Why?

So it seems I'm going to be stumping up for a regular laptop this time, safe in the knowledge that my ideal tablet won't arrive at least until it's time to upgrade again, possibly after this (Did I hear Windows 8?).

So what about the Android slate? Well the reality is I have no neeed for a slate device so it's just a "perhaps one day" thought. An iPad may have appealed if it supported flash and wasn't locked into the app store.

What really strikes me, as I mentioned before, is how I am now even considering an Android device over Windows (be afraid Microsoft, you're starting to loose the faithful like me). But at the same time I take comfort in the fact that I am able to see beyond the brand, and it mirrors what's happening on my desktop too.

Sure I've experimented with Linux over the years from Red Hat to Ubuntu, but for all its sins Windows has suited me far better (yes, even Vista). Linux has always had an air of "not quite" about it, not for everyone, but for my "needs" and probably "wants".

18 months ago I went mental when somebody installed Chrome on my mums PC. I was running mostly Firefox and a little IE7 when required. When IE8 arrived I found it better for my liking than Firefox (which had started to show signs of copying the worst problems of IE) so switched back to mostly IE8. Now I find I'm increasingly using a combination of Chrome and IE8, especially after reading the results from a recent security conference where all the other main browsers were hacked in around 10 minutes, yet for the second year running chrome resisted attack.

On the Java IDE front I used to be a massive fan of JBuilder. This was eventually replaced by Eclipse in my toolbox, then Netbeans, and now, mostly from necessity, I find myself back to Eclipse again. It's just a case of the right tool, or the necessary tool for the job.

As I get older I'm having less of an emotional tie to software and devices, and more of a practical attachment, which is why I don't need to be locked in any more than is necessary. Of course, this is not possible as any software I do buy, unless it is free and available on multiple platforms, will inherently be tied to a platform(s).

That's one of the reasons why things like Adobe Flash, Java and to a (much) lesser extent Silverlight and .Net are important as they facilitate some level of platform drift. And that's the real reason why Apple doesn't want you to have them.

The rumor for Windows 8 is that it too will have an application marketplace. The way Microsoft seem to be mimicking Apple these days, I fear the day when you can only run approved applications in Windows may not be far off. When that happens perhaps it won't just be Google's Chrome that's on my desktop.

Friday, 12 February 2010

WHS: The Big Install (Part 3)

After my earlier entry WHS: The Big Install (Part 1) I received a comment from tolonensan noting that they solved a similar problem to mine, namely that my 1TB SATA 300 drive was not being recognised by my nForce2 motherboard. T

olonensan wrote that by setting a jumper on their drive they were able to force it to SATA150. I figured this would be worth a go and set about finding a document that would show which of the jumpers on the back of my drive would allow me to do this, since the label on the drive contained no information.

As it turns out the changes for a Samsung F1 1TB drive is set via a utility called ESTools (downloadable from the Samsung web site), which is both a step forward and a step back. I can see it makes some sense to add this functionality in with the general tool set, however it does rely on you having a machine available that can read the unaltered disc in order to make the changes. Fortunately this was not a problem for me, however some people may not be so fortunate (although I suspect these people also wouldn't know the difference between a SATA 150 and 300 drive anyway). So a catch 22 that could have been avoided by jumpers, but then these bring their own problems too.

Anyway, after making the change on my desktop PC I plugged the drive back into the WHS shuttle box and it was instantly recognised. Unfortunately there wasn't enough physical space for this drive in the machine alongside the others, so I merely added it to the array, then removed the old low capacity SATA drive from the array and waited about half an hour for the data to be moved from the old drive and re-balanced on the new configuration.

It was then just a simple case of unplugging the old drive and powering the machine back on and waiting for the moment of truth... and... it worked flawlessly.

So the machine is now in the configuration I first intended, well almost. I wanted:

  • Primary (OS) Drive: SATA 1Tb (An old SATA 300 Samsung F1 from my desktop machine)
  • Additional Drive: PATA 500Gb (The data drive from the old Ubuntu Box)
  • Additional Drive: PATA 300Gb (The system drive from the old Ubuntu Box) 

What I've actually got is:

  • Primary (OS) Drive: PATA 500Gb (The data drive from the old Ubuntu Box)
  • Additional Drive: PATA 300Gb (The system drive from the old Ubuntu Box)
  • Additional Drive: SATA 1Tb (An old SATA 300 Samsung F1 from my desktop machine)

which I'm perfectly happy with. Should I need more space I can either add a USB external drive (or possibly FireWire?) or simply replace the 300Gb PATA drive with a larger SATA drive by following the same process as removing to other SATA drive. I have no idea how difficult it is to remove the drive with the OS on it, but I imagine this is a no-no. It doesn't really matter as by the time that happens either the next version of WHS will be out and I'll have re-installed anyway, and.or more likely I'll be running on other hardware.

And the old SATA 150 drive? Well that's gone into my desktop machine as a scratch drive, but to be honest I'm not really using it at the moment. The grand plan is to have it as a local backup to replace the external 300Gb USB drive I currently have attached, and have one less power drain in the house. I would copy the data from this onto the WHS, but even with duplication I'm a little nervous about this, and as I've discovered to my cost with the Ubuntu box: You may call it a back-up copy on a back-up device, but if that device contains the only copy of your data then it's actually the primary and only copy and it's not backed up at all.

I also took the chance a week ago to take the graphics card out of my WHS box, so it is effectively running headless and hopefully saving about 10W (it's an old card). This didn't worry the installation at all (my trial installation restarted 3 times before it settled down) and a single re-boot had the machine back on the network and running fine.

What has stumped me (and I wonder if this is connected) is that I also updated the LightsOut plugin at about the same time, and this no longer wakes from sleep mode. I didn't change any BIOS settings, but to check I need to plug the graphics card back in and look at the BIOS settings, which isn't ideal.

If, and it's a long shot, LightsOut requires the graphics card to work properly (and I've no idea why it should), then it will be staying in as it's a good add-on, and will likely save me more than the 10W drop in power when the machine is on.

Although if anyone has any ideas what settings I should be using...

Friday, 4 December 2009

PhotoSynth Updated

I see from an old posting on the Channel 9 RSS feed that Photosynth has been updated.

If you are interested in photographing locations or objects you really should take a look at this, it's awesome technology.



In other news you may have seen that Bing Maps is starting to use GeoTagged Photosynth images, so there's another chance to show off your photographic skills. I have images scattered over Google Maps via the postings I've made to Panoramio, so it will be interesting to see if any of my synths make it to Bing.

I should probably check that they're geo-tagged first!

Sunday, 15 November 2009

Welcome

“Ah” I hear you say, another new blog for me not to update, and you’re probably right, so let me attempt to explain:

Until recently I’ve been running (but not maintaining) my website on a Linux box sat at home under my TV which was working very nicely. Recently however, I upgraded it from Ubuntu 9.4 to 9.10, at which point it decided to not recognise my second HDD, effectively rendering the box useless without, possibly, rolling back. I then read that they estimate only 10% of users upgraded in-place without issue.

At the same time Windows 7 arrived on the scene, of which I had pre-ordered 3 copies. One of copy of Windows 7 was to update my old machine based around an Nvidia GeForce 2 chipset, which I now know isn’t supported by the new OS (or it seems, Vista before this). The result of this is that I now have the choice of either rolling back to Windows XP Media Center Edition, or buying new hardware.

I’ve been running XP MCE for years, at it streams nicely to the Xbox 360, hence why I had this in addition to the Linux box (yes, I had installed various media streaming solutions to the Ubuntu box, but none of these had the tight integration MCE offers.

Then, yesterday, I had a thought. Doing a little research it seems that Windows Home Server will also play nicely with the hardware, plus this will allow me to backup from my various boxes very easily. I had been looking at an HP solution for about £400, but I just don’t have that kind of money anymore, but if it works on the old hardware…

So I’ve downloaded the 30 day trial (and I now see there’s a 120 day trial available), installed it on the old XP MCE machine without too much trouble, and I’m now testing this.

The upshot of all of this is that, if it goes well, they’ll be a reduced need for the Ubuntu server, especially since running 2 machines 24-7 is going to use more electricity (which isn’t cheap nowadays) so I’ve decided to move my tech blog that was based on that machine to here, at least for the time being, we’ll see how it goes.

I’ll update all the URLs when there’s a few more entries on here, then just fix the old Ubuntu box when I get time, and use this as a test machine.

I hope that makes sense.

Stu.