Showing posts with label hardware. Show all posts
Showing posts with label hardware. Show all posts

Thursday, 4 June 2020

When the Manager Went Fishing

A long time ago in a work group far away there was a bunch of problems coming up in a code base whilst the manager (who had written the very code we were debugging) was up to his knees in a Scottish stream on a salmon fishing holiday....

So yeah, the code didn't work, it was a statemachine implemented in a bunch of "if" statements a smattering of switch statements and flags which were not properly mutually exclusive... so it was a statemachine in name only really.

This particular piece of code was responsible for paying money out of a machine, and as such came under scrutiny when customers started to notice that it was either paying out more than expected or the players of the machine noticed it was paying far less than expected.  A double whammy.

This problem was looked at first by a chap in the team who didn't really get along with anyone else, and he asserted he had solved the problem... I wasn't his manager, but we accepted his word on the matter and issued a release.  This turned out to be the start of a series of problems, for with the focus on this problem the test department took it upon themselves to actually test this fault to within an inch of it's life, and of course they found the problem persisted.

The wheels then came off this development train.

For the technically senior person in the department didn't get on with the chap who had looked at this problem first, they did not get on at all... not one jot.

And I ended up sitting between these two as both a debugging sounding board but physical altercation deterrent, which it's a great place to stand between coworkers who really just needed to grow up.

The debugging progressed from the mess of code into a rewrite of one function, and this started with a large discussion around a 10 foot white board (I love working on a whiteboard).

We came up with the expected behaviour, worked out the inputs we knew and then how to get that expected output to physically happen, and did so.

It worked, it would have taken that one day.... The test department were happy with their results.

The problem?  All releases had to go through review and the binaries built and packaged by one specific person... The Manager... who was still scaring salmon with a pointed stick.

We had to get on the phone to him, do you know how patchy mobile reception is in the highlands?... No... Well, "VERY" is the best way to put it.  We managed to speak to him twice, but then had to get his permission at every step, "Do the work" it's done, "build the binary" it's built, "package the update" it's compressed, "create the release notary" it's written... 

All these calls back and forth to stitch together what should have been my simply putting the package on a flash stick and handing it to the test department (because they tested everything off of our network to be as real to our operating environment as possible).

It was a nightmare... An utter break down in co-worker communications between the other two chaps, the manager not releasing the reins of control*... The slow turn around of a build and messy nature of the codebase we had to edit... not to mention that the problem was subtle and caused by a miss-understanding between the true behaviour of a physical device compared to the expected virtual representation of it within the system's view.

There, that's what happens when the manager went fishing.





* In the hope of accruing himself come modicum of job security by appearing to be a key man.

Tuesday, 5 November 2019

Monitor Stuck in Interlaced Mode?

Sorry for the very long delay between posts, I am just incredibly busy... But, here's a problem I've just had to solve and I thought worth coming to these pages for... Ever had a screen stuck in interlaced mode?

So my monitor is an Asus MX27AQ, really nice screen, but I was part of Alpha testing of a game at the weekend and it had set the game into what appeared to be 1920x1080@60hz interlaced mode.  I have NO idea why the game did this, but it was all testing and work in progress, they had a report and I closed the game.

But, it left my screen stuck in a strange way, it wasn't interlaced it had gone back to progressive, but it was at 59hz not 60, no matter what I did with drivers or windows display settings it was stuck at a lower refresh rate, selecting 60hz just resulted in no change and the "Do you wish to keep these changes"... Nothing was happening, either accepting them or reverting them.

And the horizontal pixel clock seemed to be off, now I could not change this setting, either in the screen controls, windows display controls nor by removing and reinstalling the display driver nor graphics card driver, even removing all the settings seemed to leave the screen still in this situation... I reset it, re-powered it, disconnected reconnected... I did everything physical and software related.

Absolutely frustrated I then delved a bit deeper, and inside the nVidia display settings I found "Create Custom Resolution", you can get to it on your own nVidia card via their menu...




The key thing for me was to create an invalid resolution, so I just changed progressive to interlaced...


And hit that "Test" button at the bottom.

The screen went on the fritz immediately, but only for 15 seconds as I didn't accept the changes and the screen righted itself.

Properly righted itself, all the settings came back, the pixel clock skew was gone and I could see 60hz and select it for the display again.

I think this was a case of the screen itself holding onto some setting maybe on its own firmware... I'm totally guessing... and in kicking it again via the nVidia driver I cleared the bad settings out.

But, the did persist, over power cycles, over reboots, over removing and replacing the drivers and even taking the screen to another PC (in my case a laptop) I even changed from a Display Port cable to an HDMI cable.  The only thing to sort it out was the bad custom resolution and letting the display return to "normal".

Tuesday, 31 January 2017

Development : Simple Versus Complex

I have been reading some of Alan Turings works, specifically some of his work for the NPL in the late 40's and early 50's, before he went to Manchester in frustration with the NPL's lack of progress with his ideas.

One of the ideas Turing was pressing at the time was to do as much as he could in software, don't jump to hardware solutions; which at the time fixed the functionality of the machine to a single purpose; instead he wanted a general computing device he could put to any uses he desired.

Today the average programmer, hobbyist or indeed employed software worker, such as myself, don't have the opportunity to define new hardware for a bespoke task, indeed the machines we are driving are far more powerful than Turing ever imagined and we can do as Turing suggested, we can write software to get around an issue.

You need encryption, why pay to plug in a dongle doing this, when the processor you have is equipped to do the task for you, indeed some processors even have encryption instructions and powerful parallelism built into assist in such work!

So today's lesson is, take on board Turing's ideas, do in software as much as you can, even if you want to later move to real hardware emulate your idea now.  Here's a very good example:


nVidia's emulation lab is an extreme example, however, it is indicative of the kind of problems we are meeting today as older engineers are coming away from dedicated hardware devices (because their machines were too slow in the 1990's) and we have today's extremely powerful machines right there at our finger tips.


Why does this exist?
Last week I set about looking at a quite old system (circa 2008 it was last attended to) it contains a message passing system, which allows passing of messages (events if you will) between producers in any process to consumers in any other process subscribed to the service.  It did this with a windows service driver, which called down into a USB dongle to queue the message.

The consumers then polled the USB device (round robin style) to determine if the next message was for that consumer... You might imagine this was extremely slow.

It was also very complex, the code within the USB dongles was not mutable; being set in silicon; and the consumers could end up locked out of the service queue by a message being present for a consumer which was not able to consume the message.

This clearly needed replacing.... So, I had to look at it, a single afternoon, it was just extremely complex inside, so one had to take a step back, don't look at the contents of the code, look at the API, the functions being used....

The producer code relies on just three functions and the consumer relied on a thread safe queue which was woken up from a spin wait to call the registered consuming function... Not rocket science.

I set about writing new code with a very simple UDP server and clients, taking the message in, converting it to XML and posting it to the loopback IP Address of the master UDP listening port which then sent it out to the listening consumers on their loopback IP and port number.

Voila, in an afternoon, I had replaced five years (ish) of complex, hard to maintain code, with a working prototype of a solution.  And it dropped straight into place.  The dedicated, slow, old, hardware could be unplugged and the system just carried on as it always had.

The customer for this product is delighted to see it running faster, and the overhead of the hardware costs being removed.  All by simply doing in software something which was being offloaded to hardware in yester-year.

Monday, 4 April 2016

Junk PC - Celeron to Core 2 Quad

You may guess I've taken what was basically a junk PC from the in-laws and turned it into a fairly decent machine, what could it do?... Well it was reported to be showing "video like an old slide-show", "internet pages took so long to load we could boil the kettle" and a myriad other little things.

To hear those kind of reports from regular users of 70+ years of age, rang alarm bells, something needed to be fixed.

The machine was:

Intel Celeron 450 @ 2.2ghz
1GB DDR2 400Mhz RAM
Intel HD 3000 Graphics (on board)
320GB western digital carvier blue HDD

I've raided ebay, Amazon and my own spares, and the machine is now, re-cased, with new air-flow/cooling, and it's significantly improved:

Intel Core 2 Quad Q6600 @ 2.4ghz
4GB DDR2 800Mhz RAM
Asus GeForce 610 GT (1GB DDR3)
120GB Scandisk Performance SSD

With a nice new box, the thermal paste, a cleaning air-can and all the bits I needed the upgrade cost just shy of £60.

And the new incarnation of the machine runs:

World of Warships - High Settings - 50FPS
World of Tanks - High Settings - 50-60FPS
Minecraft - Fullscreen - 100+FPS
Arma 3 - Medium Settings - 25FPS
Arma 2 - High Settings - 60FPS
H1Z1 - Medium Settings - 50FPS

This is impressive performance from a bog standard Intel G33 Motherboard and a bunch of spare parts.

Certainly £60 was a very fair price for all this kit, and I can't help but thank the moron on ebay who sent me a mail abusing me for listing "such old shit at a high price"... because through whatever machinations I kept the kit, and here we are just a month on with is back in use and blowing through performance like no-ones business.


Saturday, 2 April 2016

PC upgrades, and more coding ideas

As you can see, I'm in the middle of working on some PC kit.  Upgrading the in-laws old kit and retiring one of mine in the process.

I'm going to be working on the second part of my functional programming post later today, covering some alternate languages and better explaining maintainable code with relation to those parameters being passed.

Tuesday, 1 December 2015

PC Upgrade - SSD

Main PC overhaul, it's been a long time coming, but I finally have an upgrade for my main PC.  It comes off of the back of Black Friday where I got 48% off of the list price, so got to indulge.

It's of course, a new SSD, I've bought a SanDisk, 6g/sec SATA, 2.5" unit.  Windows has been installed on it, Linux is not going on this directly, that'll go on another of my drives as a dial boot option.

For this SSD is for gaming.

WarThunder was 90% downloaded last night before I caught myself drifting off to sleep in my very chair, but other games have to follow, and I need to set up my Track IR (again) and my Sietek Hotas.

The driving force behind the upgrade has been oneof the drives (I carry 6 in the machine) has developed a clicky, sometimes whine, so I wanted to replace the main boot disk and then work out which was making this noise and retired it.

I only have to be very careful now in backing up all the data I want to store.

Vmware player at home will be my next task, I love vmware player, at work I've been supplied with VmWare workstation, and I use it so much to do different things with whole different systems, that at home I've also taken to being used to firing up Linux inside windows, or windows inside linux, it's just so much easier.

Anyway, main machine is literally up on blocks... Tonight, is sorting out the cabling and packing it all back together.

Monday, 2 March 2015

USB 3.0 Storage Project

This weekend has seen the final parts of the server infrastructure I had powered down, and this leaves me with a gap in my storage needs.

I carry two mechanical harddrives, old laptop 2.5" drives, power by 5v with me most of the time, but these are getting old (and they were already old before I pulled them out of the retiring laptops they served) they're also quite slow and I have no back-up for them.

This is a situation which can not continue on my conscience.  Therefore, I've just bought a pair of 32GB USB 3.0 flashdrives, a cheap USB 3.0 hub and a hot glue gun.

The project is going to be to strip an old 3.5" hard drive, even dremel the middle out of it iff needs be, and after stripping the hub and sticks of their plastic shells, mounting them inside the old hard drive shell.  Screw the shell back up and hopefully I have a 64GB storage space, which is none-mechanical, and which I can just plug-in and go.

Initially this is going to be for moving some recorded files around and perhaps holding a git repository, or even my old SVN respoitories for checking or supporting projects.

If it's a successhowever, I maybe looking at a nicer strip USB hub, and slowly building 64GB sticks at a time (£10 a pop) to build up a big drive, with a full back up script etc.

I may also be getting together a USB 2.0 hub and a couple of 8GB flash drives to act as a storage backup on the web-server, this will be for the Elite Trade data to be dropped off on.


Or this lad has the idea...

Monday, 9 June 2014

Holey Hardware

I really like this story, doubt it's true, but a little part of me wishes it was...
 
/ net.rumor / sdcrdcf!dem / Mar 21, 1986 / 

This was told to me by a fellow co-worker who worked for another large main frame manufacture previously. It seems they delivered a new machine to an overseas site and during installation every time they applied power to one of the memory bays they blew every circuit breaker in the computer room.

After resetting the circuits they again applied power to the memory bay with the same results. Since this was a new machine they crated it up and shipped it back and got a replacement.

When they got the damaged memory bay back the started to tear it down to find the cause of the short. Well what they found was a small hole about 3/8 in. in diameter going from top to bottom through some of the memory arrays, which cause a very effective short.

After a lot of research they found the cause. It seems that after the memory had passed test and evaluation and quality assurance the bay was crated and put in the warehouse to await delivery. At some time during its storage an electrician was hired to do some work and since it was a secure building the security guard had to go with him.

The electrician at one point said that he had to go back down to his truck to get a drill and the guard asked why and the electrician said he needed to drill a hole right here (pointing to a spot on the floor). The guard then responded by pulling out his sidearm and proceeded to blow a hole at the appropriate spot which happened to be right above where the memory bay was being stored.

The last he knew the guard had been reprimanded and re-assigned to another of the security agency's customers.

Friday, 11 April 2014

I've been interested at looking at new CPU's and GPU's for a couple of days, not that I can afford one, but I've come to a cross roads in my thinking...

Now I can either carry straight on, or I can go left or right.. If I go left, then K is the way, if I go right its not... Let me explain.

When I talk about K, I'm talking about the current Gaming Goto Intel Core processor with a K added on, so this is the i5 4670 K and the matching i7.  Every time I turn a page about Gaming and building a gaming rig I see people say "Get the K" version... And for the life of me I can't figure out why, maybe I'm missing something, but I don't see people explaining why.


Now, you can look any place to see these chips, here they are on Amazon... And you can notice something here, a price difference, the K version has a higher price... I'm taking the right path... Right K, more cost, an added letter... It must do More!!!! MORE!... MWHOORE!!!!!.... Nope, as far as I can see the K chip does less...

The cheaper standard 4670 here does more, lets take a look at the Intel Ark page listing them...


So on the Ark there you can highlight the rows which are different, now some of the items are highlighted in error, but if we skip down to the bottom, this is where the functional changes are.  The K version has some of the Virtual technology removed...

I use that technology a lot, so a K version is not for me... But curiously, with functionality removed, the K version costs more?

This is where I'm confused, go right, enjoy the K and be in all the gaming comments... but don't be able to virtualize?  And pay more?  Go figure.

Lots of the kits I see out are also the K version bundled in.

I don't get it... I'm not able to go left, I'm not able to buy one of these kits... I don't want to go right, and buy a K.. Cus they're nerfed... So I'll just have to go straight on...

Is my direction metaphor grating?... Sorry, its because I have directions - from the multiboxer - on the mind.

Friday, 7 February 2014

Must not listen to office morons talking about building their own PC's... Must resist... Must not rise to them...


The conversation about PC's started about the person buying new kit going from an AMD product to an Intel product, then to the giant can or worms that is "Re-installing Windows 7", and then his recommending to someone else to buy a big fat new copy of windows (instead of just buying one of the perfectly legal and legit OEM stickered ones from people like Spartan).

And then he dived into his ultra cool cooling system... Which was... a case fan... yes he added one, finally.. 2014... Case Fan... Right dude... I got four and memory fans, plus a water system from CPU to GPU and out to a major dual 180mm fan radiators...

And then he started to bemoan hos loud the fans are... I could point him back to my silent fan reviews from what... two years ago... but... I can't... I can't get involved.


In other news, on top of Thursdays post about sleep, I was in bed last night at like 9:20pm and I got up for work at 5:50am... I was here and working - after a nice breakfast - at 6:50am.

Usually, when I get up at 9:20am I'm here and working by 9:50am... So, why did getting up early take nearly an hour to deliver me to work, when getting up late gets me here quick?... Hmmm...

Sunday, 1 September 2013

Upgrading to 5ghz

I've been using my N-class router in single band mode quite happily for months, however, the street has taken a change of residents there are four new younger couples, and along with them have come more and more wireless networks - all on the 2.4ghz band.

Now, I had been being a bit sneaky and watching the bands being used, and switching to the quiet channels.  However, there's a whole flood now, on channels covering the whole spectrum.

The result has been a whole series of slow-downs, drop outs, and poor network performance on my systems, except for my laptop - which was using the higher 5ghz band on the router.

So, I've stuck a new 5Ghz card into the PC.... Lets see how it goes.

Saturday, 12 January 2013

Asus P6X58D-E Failed

I've checked my machine out now, and I've come to the conclusion that all the peripherals in this machine work fine else where its down to the Motherboard.

The machine will boot, one time in one hundred, so the CPU is working it lets me boot into a live Linux CD and even boot Vista, if it boots, and its during these other ninety nine attempts to boot that the problems come along.

The problem is this, turn the power on, hit the power button (on the motherboard or on the case) and the PSU will spring to life the CPU Cooler and the Graphics card fan, all these fans spin at maximum speed, and that's it...

No BIOS, no POST, nothing... Even with a speaker attached, nothing, no beeps, nothing.

Now, this usually indicates a dead PSU, but I've tried the it in another of my machines, and its fine!

Even if I remove all the RAM, which is meant to give long beeps in sequence, the motherboard doesn't squeek, nothing, it just sits there and blank black max fan time.

The problem I have now is I need to get service on it, this thing cost me £143 on December 2010.  That's two years one month.  It gets from Asus a 3 years warranty, so I should be covered, Asus however have told me to get hold of the retailer, the retailer have yet to reply - I bet they want me to use their 60p a second help line and sit on hold for an hour.

The rub though is, even if they do try to help, or I get an RMA... my CPU is a socket 1366, its not going to just randomly fit another motherboard and 1366 boards are getting very rare on the market (for reasons which I've had no interest in, but am now trying to fathom out).  I have literally just sent missives to the retailer for assistance, I can at least prove my warranty started on the 11th November 2010, and hence is within the mandated 3 years by Asus.

And there's another problem, Asus state a 3 year warranty, but they say to contact the retailer about it?

I'll let you know how I get along.

Galant Ikea Desk
The other battle I'm fighting is about my desk, I lowered my desk last night, but one of the legs felt dead loose, you can unscrew the legs and they let you telescope them in and out, well one of them just feels all floppy and will not tighten back up.

I'm a little worried about this, but tomorrow sometime I hope to get all the crap off of the desk and to put all the legs right and level.

Tuesday, 27 November 2012

Unstable Pi Reports


I have also spent a lot of time today talking to the hardware types who work with me, I'm very much a software guy, beyond wiring a plug or sorting out my ethernet cables I try to stay away from hardware engineering.

I have been known to assemble my own computers, some people call this making, but really you're just taking pre-fabricated items and slotting them together, the kind of hardware guy I'm talking about are the kind who tinker with soldering guns and the like.

And one thing they've overwhelmingly said about their Raspberry Pi's is how unstable they are, how they crash on them and how slow they are...

Where as, I'm a software guy, I've never had my Pi crash, I've never had it be overly slow... I admit its not quick to compile complex C/C++ languages, especially when the latter is using the Boost libraries... but it has been stable.

In actual fact I've only had it crash out once, and that was not its fault, it was the fault of the SD card going dead midway through a compile!

So... What is this difference?... Are the hardware tinkerers, playing with the GPIO port causing themselves issues?  (I think so)... 

As a software tinkerer however I have no complaints...

Thursday, 23 September 2010

CivV - The Preload

Here I am folks, back from holiday, a little earlier than expected.  I've spent no time whatsoever over the last week gaming, I have however read three books in seven days.  And I'm not talking about little ones, I'm talking about 1000 pages of Robert Jordon's Wheel of Time, the whole of Terry Pratchetts "Unseen Academicals" and a good slice of a C++ book about 3D Terrain Engines... all in all, I've fed my brain sufficiently for the comming autumn season.

And with all this new brain power at the ready I've today preordered and started the pre-download of CIV5 on Steam.


To anyone else out there pre-ordering on steam, ignore the message "An unexpected error has occurred with your order", simply ensure you wait for the payment confirmed email from them, and then restart your machine.

Now, speaking of restarting machines... my Motherboard has had a fault come up today, I thought it was a memory issue until I investigated it.  My board takes four memory modules, in pairs... on the board one set of slots is black, and one is blue... the blue pair are broken.

As in, blue screen of death, beeping at the BIOS, dead as a door nail, broken.

This is my gaming rig.... so I'm currently hobbling about with half my normal compliment of RAM... god help me.

My remedy for the situation is not a simple one though, I'm going to pick up a not so cheap new mobo (which can take all my current parts) and then over the next couple of years save up for a new top of the range i7 based system.  Hopefully by then they'll be affordable.

Because I notice that parts equivalent to the ones I have fitted at the moment, are rather more expensive than one would expect after two years...

Anyway, there's been a wonderful rain storm here today, my preload now states 5.7% and tomorrow I've got nothing to do... the Mrs is on about cutting one of the ever green's tree's out back down a bit, but I'd rather take the fence panels down and torch the bloody thing... hey ho, a litre of petrol is greater than my horticultural knowledge.