Police spotted at Essex woodland after reports of 'body found in caves'
MS stricken Christina Applegate reveals teen daughter's comment that drove her to tears: 'Knife to the heart'
Keanu Reeves' stolen John Wick Rolex returned after cops bust celeb heist ring targeting Travis Kelce
Vet issues warning against 'disappointing' viral pet trend that leaves animals 'panicking and stressed'
Essex dad, 40, brought back to life after sudden heart attack left him 'dead for ten minutes'
Peacock Feathers Can Be Lasers
Read more of this story at Slashdot.
Renowned psychic George Valentino dashes hopes of a royal reunion between Prince Harry and King Charles after secret peace summit
Emma Weymouth shows off her svelte physique in a brown thong bikini as she soaks up the sun at a swanky beach club with husband Ceawlin Thynn in St Tropez
Virginia Giuffre's family responds to Trump claim that Epstein 'stole' her from Mar-a-Lago while calling Ghislaine Maxwell a 'monster'
How Queen Camilla is continuing Queen Elizabeth's style legacy with latest royal warrant
Inside England and India's bitter feud: Why the fiercest Test series in years is about so much more than cricket - as insiders reveal what each side really thinks of the other
Men born in these months are more likely to suffer from crippling mental health condition which kills thousands
Finally a crackdown on West End's brazen shoplifters: Moment prolific thieves are caught stealing £9k of clothes and £1.3k of board games in lawless London crime hotspot
Internet exchange points are ignored, vulnerable, and absent from infrastructure protection plans
Internet Exchange Points are an underappreciated resource that all internet users rely on, but governments have unfortunately ignored them, despite their status as critical infrastructure.…
CodeSOD: What a CAD
In my career, several times I've ended up being the pet programmer for a team of engineers and CNC operators, which frequently meant helping them do automation in their CAD tools. At its peak complexity, it resulted in a (mostly unsuccessful) attempt to build a lens/optics simulator in RhinoCAD.
Which brings us to the code Nick L sends us. It sounds like Nick's in a similar position: engineers write VB.Net code to control their CAD tool, and then Nick tries desperately to get them to follow some sort of decent coding practice. The result is code like:
'Looping Through S_Parts that have to be inital created For Each Item As Object In RootPart.S_PartsToCreate If Item.objNamDe IsNot String.Empty Then If Item.objNamEn IsNot String.Empty Then If Item.artCat IsNot String.Empty Then If Item.prodFam IsNot String.Empty Then If Item.prodGrp IsNot String.Empty Then 'Checking if the Mandatory Properties are in the partfamilies and not empty If Item.Properties.ContainsKey("From_sDesign") Then ' I omitted 134 lines of logic that really should be their own function Else MsgBox("Property From_SDesign is missing or empty.", MsgBoxStyle.DefaultButton2, "Information RS2TC") Exit Sub End If Else MsgBox("Property prodGrp is missing or empty.", MsgBoxStyle.DefaultButton2, "Information RS2TC") Exit Sub End If Else MsgBox("Property prodFam is missing or empty.", MsgBoxStyle.DefaultButton2, "Information RS2TC") Exit Sub End If Else MsgBox("Property artCat is missing or empty.", MsgBoxStyle.DefaultButton2, "Information RS2TC") Exit Sub End If Else MsgBox("objNamEn is missing or empty.", MsgBoxStyle.DefaultButton2, "Information RS2TC") Exit Sub End If Else MsgBox("objNamDe is missing or empty.", MsgBoxStyle.DefaultButton2, "Information RS2TC") Exit Sub End If NextAll of their code is stored in a single file called Custom.vb, and it is not stored in source control. Yes, people overwrite each other's code all the time, and it causes endless problems.
Nick writes:
I really wish we'd stop letting engineers code without supervision. Someone should at least tell them about early returns.
.comment { border: none; } [Advertisement] Picking up NuGet is easy. Getting good at it takes time. Download our guide to learn the best practice of NuGet for the Enterprise.