tag:blogger.com,1999:blog-6628985022531866193.comments2024-03-18T09:37:57.053+00:00The OldWood ThingChris Oldwoodhttp://www.blogger.com/profile/18183909440298909448noreply@blogger.comBlogger248125tag:blogger.com,1999:blog-6628985022531866193.post-25998180285291235352024-02-12T17:37:05.629+00:002024-02-12T17:37:05.629+00:00This solved a very annoying problem for me. Thank ...This solved a very annoying problem for me. Thank you for posting!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-90518869803462907312022-11-15T17:12:02.725+00:002022-11-15T17:12:02.725+00:00I have updated my associated Gist with comments th...I have updated my associated Gist with comments that contain new configuration options which might be interesting: <br /><br />https://gist.github.com/chrisoldwood/aeec1e6876dadcc407109896d8d8aac7<br /><br />* Switching to boot via UEFI<br />* Simplifying the qemuargs<br />* Enabling SSH for remote access<br />* Enabling host / guest clipboard support<br />* Switching the SSH shell to Bash (Git for Windows)Chris Oldwoodhttps://www.blogger.com/profile/18183909440298909448noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-91084449427854524802022-11-15T17:06:27.240+00:002022-11-15T17:06:27.240+00:00One term I learnt a few months after writing all t...One term I learnt a few months after writing all this was "slipstreaming drivers" which caused a different bunch of articles about this to appear in my google search results.<br /><br />Whereas I'm mounting a floppy drive with some config / scripts and the 3rd party virtio drivers ISO as a CD drive, others appear to have merged all three (config + drivers + Windows) into a single ISO image and use that as the source ISO.<br /><br />I didn't explore this option at all as I decided it was preferable to reuse the existing ISO files (easier to update) and it also avoids needing an additional "merge" step when updating our baseline images.Chris Oldwoodhttps://www.blogger.com/profile/18183909440298909448noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-48117224481061823882022-01-28T13:49:12.516+00:002022-01-28T13:49:12.516+00:00Back in my day when I hired people, I would give t...Back in my day when I hired people, I would give the candidate what amounted to a take-home test and some freedom as to how quickly to respond. Problems were only slightly more difficult than the sorts of problems encountered at work. In addition to the correct answer, what was often more interesting was how to see how easy the candidate was to deal with and how responsive they were. I would often leave out some key direction to see how the candidate would solve the problem.<br /><br />Afterwards, I would have a long-ish phone discussion (this would have been in the mid 1990s, Skype and friends were not widely used) as in a sense the candidate was no longer a stranger. I always felt that traditional interviews, especially when the candidate would have to code in front of an audience, brought out the worst if the candidate were stressed.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-358513706633312492021-12-25T11:46:26.731+00:002021-12-25T11:46:26.731+00:00Loved reading this, thank youLoved reading this, thank youEvanhttps://www.evanstafford.com/noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-81130393350842223592021-11-16T18:22:02.148+00:002021-11-16T18:22:02.148+00:00TLD means Test Later Development.
LeBlanc's L...TLD means Test Later Development.<br /><br />LeBlanc's Law: Later means Never.<br /><br />Substituting...<br />TLD means Test Never Development.<br /><br />Which jibes with my experience of TLD teams.Eljayhttps://www.blogger.com/profile/12155896720169544542noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-41861952708444455712021-09-27T22:40:33.277+01:002021-09-27T22:40:33.277+01:00I've seen "nt" in other contexts mea...I've seen "nt" in other contexts mean "no text", so that's definitely what I would have assumed. <br /><br />It wouldn't have even occurred to be that those characters might have been showing up for some other reason.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-14660264306652802062021-09-27T21:14:15.861+01:002021-09-27T21:14:15.861+01:00ntntAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-32797231330671341152021-02-23T07:57:29.242+00:002021-02-23T07:57:29.242+00:00Just wanted to say I've encountered the same p...Just wanted to say I've encountered the same problem in 2021. Having a pscustomobject with properties with square brackets still breaks Select-Object. I've switched to () as a simple workaround.<br />Unfortunately MS Connect is not longer operational, so I couldn't take a look if your feedback got anywhere.<br />Thanks for this article though :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-90278842723966289562021-02-11T21:20:32.014+00:002021-02-11T21:20:32.014+00:00Not something I've tried to do but a quick goo...Not something I've tried to do but a quick google leads here if that helps:<br /><br />https://social.technet.microsoft.com/Forums/windows/en-US/63eccbca-09f6-46e1-b701-3c450249342d/unattendxml-automate-static-ip?forum=winserversetupChris Oldwoodhttps://www.blogger.com/profile/18183909440298909448noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-40210555796680410022021-02-11T19:34:56.295+00:002021-02-11T19:34:56.295+00:00Is there some way in the autounattend to set the i...Is there some way in the autounattend to set the ip address or address for the Windows VM?Erichhttps://www.blogger.com/profile/12124646338465081767noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-1912123043413307692020-11-26T07:46:28.662+00:002020-11-26T07:46:28.662+00:00I am strugging with the same problem, and Peter Ru...I am strugging with the same problem, and Peter Rudeman is definitely correct. The problem is that is applied the custom converter when trying to deserialize the implementing (sub)type as well, because it is inherited.<br /><br />We had used the "new T()" solution and serializer.Populate, but then suddenly someone introduced a [JsonConstructor] property, and we didn't understand at all why the attribute "wasn't working". Except it was. But we just called the empty one too, in our converter. This is not an easy one. Trying to find a good solution without re-implementing much of the logic here:<br /><br />https://github.com/JamesNK/Newtonsoft.Json/blob/master/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs#L1934erikbrahttps://www.blogger.com/profile/00713297116618581641noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-44901948825916558652020-06-11T23:09:22.906+01:002020-06-11T23:09:22.906+01:00Thanks Chris! You saved quite a bit of head scratc...Thanks Chris! You saved quite a bit of head scratching.Matthttps://www.blogger.com/profile/03236762360630571563noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-67180638886856744772020-05-14T22:56:13.546+01:002020-05-14T22:56:13.546+01:00I think the problem is that the JsonConverter attr...I think the problem is that the JsonConverter attribute is inheritable. When Newtonsoft tries to deserialize the subtype, it sees the same converter attribute. But it doesn't call "CanConvert" to see if the inherited converter applies to the subtype. Pretty clearly a bug in the library IMHO.Peter Rudermanhttps://www.blogger.com/profile/17208643236636833176noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-70093333652330923002019-10-19T10:30:18.127+01:002019-10-19T10:30:18.127+01:00Brilliant, thank you, best solution to avoid the s...Brilliant, thank you, best solution to avoid the stack overflow I could find :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-14390554950868092142019-09-14T16:10:55.534+01:002019-09-14T16:10:55.534+01:00Essentially the deserialization engine has many co...Essentially the deserialization engine has many converters and the base type should really be an interface.<br /><br />Removing the converter at runtime is basically out of the question, so my generic solution is at least satisfactory for meMatthew Lyonhttps://www.blogger.com/profile/07289850282563735819noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-25347540293457351472019-09-14T15:22:17.733+01:002019-09-14T15:22:17.733+01:00I'm following the same thinking that you had a...I'm following the same thinking that you had and I think I've come to understand what is happening.<br />Adding a custom JsonConverter is essentially a short circuit within Newtonsoft.Json. The mistake we're making is to consider our CustomJsonConverter as an overload of existing functionality when really it is a hook into the pipeline.<br />I attempted to call base.ReadJson within my customer converter and it created the loop for me.<br />So unless we can remove the converter at runtime from that pipeline or create a new one without it, we'll encounter this loop.<br />This is essentially what the "deserializing polymorphic classes" question did by not applying the custom converter to sub types (and not using it as an attribute so that it isn't automatically applied). The converter is applied to the base class and then decides which child class to run through the pipeline. Those child classes will not have the Jsonconverter attribute and so will not encounter the loop. It works but in my mind is brittle.<br />My solution was to use generics, create an instance of the class and use populate.<br />public class CustomConverter : Jsonconverter where T: new()<br />public override object ReadJson(...)<br />{<br />JObject jObject = JObject.Load(reader);<br />var instance = new T();<br />serializer.Populate(jObject.CreateReader(), instance);<br />return instance;<br />}Matthew Lyonhttps://www.blogger.com/profile/07289850282563735819noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-71035075053943195882019-03-07T22:00:27.364+00:002019-03-07T22:00:27.364+00:00Reading this I got an increasing sense of deja vu,...Reading this I got an increasing sense of deja vu, but mine was not quite the same. Back when I was working on Railtrack (or software was only a small part of that big disaster) I to got a report from Test that I couldn't reproduce. Again, testers could see it but not developers just like your example.<br /><br />Eventually I got it down to a Visual C++ 2.0 bug which only effected Intel machines. The testers had Intel machines, developers had AMD based Dell's. The compiler was making an optimisation in integer initialization which was fine on AND but failed in Intel. The fix was to disable optimisation.<br /><br />Yes I know we expect it to be the other way around - AND is a copy of Intel after all - but that's why it sticks in my mind.<br /><br />Otherwise, my story is pretty much yours. <br />allan kellyhttps://www.blogger.com/profile/06262139490250478379noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-57680664084240720672018-09-30T04:17:17.848+01:002018-09-30T04:17:17.848+01:00Very interesting account of the bug. I fall victim...Very interesting account of the bug. I fall victim for the easy fix from time to time. Thanks for the reminder to avoid. Andy Malehhttps://www.blogger.com/profile/10268484073612495328noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-20855954183626200252018-08-23T04:54:02.742+01:002018-08-23T04:54:02.742+01:00You can take some of the pain away by using a gene...You can take some of the pain away by using a general composition class using the "Curiously Recurring Template Pattern" .. see my answer at https://stackoverflow.com/a/51295920/460084Michahttps://www.blogger.com/profile/09060238979679811909noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-14112534838793732152018-03-25T02:28:58.965+01:002018-03-25T02:28:58.965+01:00Sadly this was all propriety code and I've lon...Sadly this was all propriety code and I've long since moved on but we were heading in a similar direction for a while.<br /><br />However we never went too far in the end as we decided to put more effort into using our internal APIs to read and write data. The side-effect of this was to only persist data we really needed - if we never read it we shouldn't bother writing it in the first place. This kept the database lean.<br /><br />In the intervening years I've looked to rely more on high-level acceptance tests as the performance of these are far more palatable than 10 years ago even on an average developer laptop.Chris Oldwoodhttps://www.blogger.com/profile/18183909440298909448noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-30981048670977628642018-03-24T09:40:35.383+00:002018-03-24T09:40:35.383+00:00Great article, Chris. Not so much is written on SQ...Great article, Chris. Not so much is written on SQL integration tests publicly.<br /><br />Though I have question regarding your implementation of NUnit constraint model. Can you post the source code of it? We actually implemented similar thing (https://gist.github.com/ajukraine/035e5de67abe6b70ad4089d386c64759), but I'd like to compare it with others similar solutions.<br /><br />Also I'm not sure that custom fluent assertion SQL API is better than pure SQL or some lightweight ORM with Linq support. What you think?ajukrainehttps://www.blogger.com/profile/08208310312514423438noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-87609243605602811372018-02-27T21:18:51.842+00:002018-02-27T21:18:51.842+00:00I think we both need some sort of "badge of h...I think we both need some sort of "badge of honour" we can stick on our machines to show our pain at stumbling into this :o).Chris Oldwoodhttps://www.blogger.com/profile/18183909440298909448noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-67020317226009654342018-02-27T04:09:59.793+00:002018-02-27T04:09:59.793+00:00This behaviour is completely undocumented and unex...This behaviour is completely undocumented and unexpected, as one assumes the data is send to the server as-is without conversions. I was expecting any binary data could be sent, but if I read the docs better it talks about "command strings" arnoudmulderhttps://www.blogger.com/profile/11378611682537616292noreply@blogger.comtag:blogger.com,1999:blog-6628985022531866193.post-82850085472991663852018-02-27T04:06:33.697+00:002018-02-27T04:06:33.697+00:00Oh man I just spend hours of debugging related to ...Oh man I just spend hours of debugging related to this. I am writing code to communicate with the old ClipSrv service but what ever I've tried, it failed XTYP_EXECUTE with not processed. But my application is UNICODE, and the MS ClipSrv is ANSI, so that the command strings at the server where not the onces I send seemed logical. And indeed, specifying CF_UNICODETEXT (instead of zero) and sending an UNICODE command string to the ClipSrv works. Thanks for the eye opener!<br />arnoudmulderhttps://www.blogger.com/profile/11378611682537616292noreply@blogger.com