eso

(Associate) Human Resource Officer

ADB has a vacancy for the position of (Associate) Human Resource Officer in the Budget, People, and Management Systems Department. The deadline for submitting applications is on 20-NOV-2024.




eso

Loan No. 2542-BAN (SF): Participatory Small Scale Water Resources Sector Project [LGED/PSSW/PD/Ukhia/Cox/R-4/2013]




eso

Loan No. 2492/2493-UZB (SF): Water Resources Management Sector Project [WRMSP/ICB/03]




eso

Domestic Resource Mobilization Modernization Project




eso

Can these awesome rocks become central Asia’s first UNESCO Geopark?

Long feted by fossil hunters and geologists, if UNESCO recognises the extraordinary rock formation at Madygen in Kyrgyzstan, it will soon be a player on the world stage




eso

Ancient Mesopotamian clay seals offer clues to the origin of writing

Before Mesopotamian people invented writing, they used cylinder seals to press patterns into wet clay – and some of the symbols used were carried over into proto-writing




eso

Ancient Mesopotamian clay seals offer clues to the origin of writing

Before Mesopotamian people invented writing, they used cylinder seals to press patterns into wet clay – and some of the symbols used were carried over into proto-writing




eso

Adding a Stent May Help Resolve Brain Aneurysm

Title: Adding a Stent May Help Resolve Brain Aneurysm
Category: Health News
Created: 8/25/2009 12:10:00 PM
Last Editorial Review: 8/26/2009 12:00:00 AM




eso

hexylresorcinol

Title: hexylresorcinol
Category: Medications
Created: 6/28/2022 12:00:00 AM
Last Editorial Review: 6/28/2022 12:00:00 AM




eso

Dynamic dysregulation of retrotransposons in neurodegenerative diseases at the single-cell level [RESOURCES]

Retrotransposable elements (RTEs) are common mobile genetic elements comprising ~42% of the human genome. RTEs play critical roles in gene regulation and function, but how they are specifically involved in complex diseases is largely unknown. Here, we investigate the cellular heterogeneity of RTEs using 12 single-cell transcriptome profiles covering three neurodegenerative diseases, Alzheimer's disease (AD), Parkinson's disease, and multiple sclerosis. We identify cell type marker RTEs in neurons, astrocytes, oligodendrocytes, and oligodendrocyte precursor cells that are related to these diseases. The differential expression analysis reveals the landscape of dysregulated RTE expression, especially L1s, in excitatory neurons of multiple neurodegenerative diseases. Machine learning algorithms for predicting cell disease stage using a combination of RTE and gene expression features suggests dynamic regulation of RTEs in AD. Furthermore, we construct a single-cell atlas of retrotransposable elements in neurodegenerative disease (scARE) using these data sets and features. scARE has six feature analysis modules to explore RTE dynamics in a user-defined condition. To our knowledge, scARE represents the first systematic investigation of RTE dynamics at the single-cell level within the context of neurodegenerative diseases.




eso

PWAS Hub for exploring gene-based associations of common complex diseases [RESOURCES]

PWAS (proteome-wide association study) is an innovative genetic association approach that complements widely used methods like GWAS (genome-wide association study). The PWAS approach involves consecutive phases. Initially, machine learning modeling and probabilistic considerations quantify the impact of genetic variants on protein-coding genes’ biochemical functions. Secondly, for each individual, aggregating the variants per gene determines a gene-damaging score. Finally, standard statistical tests are activated in the case-control setting to yield statistically significant genes per phenotype. The PWAS Hub offers a user-friendly interface for an in-depth exploration of gene–disease associations from the UK Biobank (UKB). Results from PWAS cover 99 common diseases and conditions, each with over 10,000 diagnosed individuals per phenotype. Users can explore genes associated with these diseases, with separate analyses conducted for males and females. For each phenotype, the analyses account for sex-based genetic effects, inheritance modes (dominant and recessive), and the pleiotropic nature of associated genes. The PWAS Hub showcases its usefulness for asthma by navigating through proteomic-genetic analyses. Inspecting PWAS asthma-listed genes (a total of 27) provide insights into the underlying cellular and molecular mechanisms. Comparison of PWAS-statistically significant genes for common diseases to the Open Targets benchmark shows partial but significant overlap in gene associations for most phenotypes. Graphical tools facilitate comparing genetic effects between PWAS and coding GWAS results, aiding in understanding the sex-specific genetic impact on common diseases. This adaptable platform is attractive to clinicians, researchers, and individuals interested in delving into gene–disease associations and sex-specific genetic effects.




eso

High-resolution reconstruction of a C. elegans ribosome sheds light on evolutionary dynamics and tissue specificity [ARTICLE]

Caenorhabditis elegans is an important model organism for human health and disease, with foundational contributions to the understanding of gene expression and tissue patterning in animals. An invaluable tool in modern gene expression research is the presence of a high-resolution ribosome structure, though no such structure exists for C. elegans. Here, we present a high-resolution single-particle cryogenic electron microscopy (cryo-EM) reconstruction and molecular model of a C. elegans ribosome, revealing a significantly streamlined animal ribosome. Many facets of ribosome structure are conserved in C. elegans, including overall ribosomal architecture and the mechanism of cycloheximide, whereas other facets, such as expansion segments and eL28, are rapidly evolving. We identify uL5 and uL23 as two instances of tissue-specific ribosomal protein paralog expression conserved in Caenorhabditis, suggesting that C. elegans ribosomes vary across tissues. The C. elegans ribosome structure will provide a basis for future structural, biochemical, and genetic studies of translation in this important animal system.




eso

Characterizing the Distribution of a Stimulator of Interferon Genes Agonist and Its Metabolites in Mouse Liver by Matrix-Assisted Laser Desorption/Ionization Imaging Mass Spectrometry [Special Section on New and Emerging Areas and Technologies in Drug Met

A STING (stimulator of interferon genes) agonist GSK3996915 under investigation in early discovery for hepatitis B was orally dosed to a mouse model for understanding the parent drug distribution in liver, the target organ. Matrix-assisted laser desorption/ionization (MALDI) imaging mass spectrometry (IMS) was used to quantify the distribution of GSK3996915 in liver collected from mice administered a single oral dose at 90 mg/kg. GSK3996915 was detected with a zonal distribution localized in the portal triad and highly concentrated in the main bile ducts, indicating clearance through biliary excretion. High spatial resolution imaging showed the distribution of the parent drug localized to the cellular populations in the sinusoids, including the Kupffer cells. Additionally, a series of drug-related metabolites were observed to be localized in the central zones of the liver. These results exemplify the potential of utilizing MALDI IMS for measuring not only quantitative drug distribution and target exposure but also drug metabolism and elimination in a single suite of experiments.

SIGNIFICANCE STATEMENT

An integrated imaging approach utilizing matrix-assisted laser desorption/ionization imaging mass spectrometry (MALDI IMS) complemented with immunohistochemistry (IHC) and histology was used to address the question of target exposure at the cellular level. Localized quantification of the parent drug in the target organ and identification of potential metabolites in the context of tissue histology were also achieved in one experimental suite to support characterization of pharmacokinetic properties of the drug in the early discovery stage.:




eso

“Je suis desole, ȷe parle francais”: How English Hegemony Undermines Efforts to Shift Power in Global Health

Le texte complet de l’article est aussi disponible en français.




eso

[18F]AlF-NOTA-FAPI-04 PET/CT for Predicting Pathologic Response of Resectable Esophageal Squamous Cell Carcinoma to Neoadjuvant Camrelizumab and Chemotherapy: A Phase II Clinical Trial

This single-center, single-arm, phase II trial (ChiCTR2100050057) investigated the ability of 18F-labeled fibroblast activation protein inhibitor ([18F]AlF-NOTA-FAPI-04, denoted as 18F-FAPI) PET/CT to predict the response to neoadjuvant camrelizumab plus chemotherapy (nCC) in locally advanced esophageal squamous cell carcinoma (LA-ESCC). Methods: This study included 32 newly diagnosed LA-ESCC participants who underwent 18F-FAPI PET/CT at baseline, of whom 23 also underwent scanning after 2 cycles of nCC. The participants underwent surgery after 2 cycles of nCC. Recorded PET parameters included maximum, peak, and mean SUVs and tumor-to-background ratios (TBRs), metabolic tumor volume, and total lesion FAP expression. PET parameters were compared between patient groups with good and poor pathologic responses, and the predictive performance for treatment response was analyzed. Results: The good and poor response groups each included 16 participants (16/32, 50.0%). On 18F-FAPI PET/CT, the posttreatment SUVs were significantly lower in good responders than in poor responders, whereas the changes in SUVs with treatment were significantly higher (all P < 0.05). SUVmax (area under the curve [AUC], 0.87; P = 0.0026), SUVpeak (AUC, 0.89; P = 0.0017), SUVmean (AUC, 0.88; P = 0.0021), TBRmax (AUC, 0.86; P = 0.0031), and TBRmean (AUC, 0.88; P = 0.0021) after nCC were significant predictors of pathologic response to nCC, with sensitivities of 63.64%–81.82% and specificities of 83.33%–100%. Changes in SUVmax (AUC, 0.81; P = 0.0116), SUVpeak (AUC, 0.82; P = 0.0097), SUVmean (AUC, 0.81; P = 0.0116), and TBRmean (AUC, 0.74; P = 0.0489) also were significant predictors of the pathologic response to nCC, with sensitivities and specificities in similar ranges. Conclusion: 18F-FAPI PET/CT parameters after treatment and their changes from baseline can predict the pathologic response to nCC in LA-ESCC participants.




eso

Intra-Aneurysmal High-Resolution 4D MR Flow Imaging for Hemodynamic Imaging Markers in Intracranial Aneurysm Instability [RESEARCH]

BACKGROUND AND PURPOSE:

Prediction of aneurysm instability is crucial to guide treatment decisions and to select appropriate patients with unruptured intracranial aneurysms (IAs) for preventive treatment. High-resolution 4D MR flow imaging and 3D quantification of aneurysm morphology could offer insights and new imaging markers for aneurysm instability. In this cross-sectional study, we aim to identify 4D MR flow imaging markers for aneurysm instability by relating hemodynamics in the aneurysm sac to 3D morphologic proxy parameters for aneurysm instability.

MATERIALS AND METHODS:

In 35 patients with 37 unruptured IAs, a 3T MRA and a 7T 4D MRI flow scan were performed. Five hemodynamic parameters—peak-systolic wall shear stress (WSSMAX) and time-averaged wall shear stress (WSSMEAN), oscillatory shear index (OSI), mean velocity, and velocity pulsatility index—were correlated to 6 3D morphology proxy parameters of aneurysm instability—major axis length, volume, surface area (all 3 size parameters), flatness, shape index, and curvedness—by Pearson correlation with 95% CI. Scatterplots of hemodynamic parameters that correlated with IA size (major axis length) were created.

RESULTS:

WSSMAX and WSSMEAN correlated negatively with all 3 size parameters (strongest for WSSMEAN with volume (r = –0.70, 95% CI –0.83 to –0.49) and OSI positively (strongest with major axis length [r = 0.87, 95% CI 0.76–0.93]). WSSMAX and WSSMEAN correlated positively with shape index (r = 0.61, 95% CI 0.36–0.78 and r = 0.49, 95% CI 0.20–0.70, respectively) and OSI negatively (r = –0.82, 95% CI –0.9 to –0.68). WSSMEAN and mean velocity correlated negatively with flatness (r = –0.35, 95% CI –0.61 to –0.029 and r = –0.33, 95% CI –0.59 to 0.007, respectively) and OSI positively (r = 0.54, 95% CI 0.26–0.74). Velocity pulsatility index did not show any statistically relevant correlation.

CONCLUSIONS:

Out of the 5 included hemodynamic parameters, WSSMAX, WSSMEAN, and OSI showed the strongest correlation with morphologic 3D proxy parameters of aneurysm instability. Future studies should assess these promising new imaging marker parameters for predicting aneurysm instability in longitudinal cohorts of patients with IA.




eso

High-Resolution MRA Cerebrovascular Findings in a Tri-Ethnic Population [CLINICAL PRACTICE]

BACKGROUND AND PURPOSE:

Incidental findings on brain MRI and variations of the circle of Willis (CoW) are relatively common among the general population. Ethnic differences have been described before, but few studies have explored the prevalence of incidental intracranial cerebrovascular findings and CoW variants in the setting of a single multiethnic cohort. The purpose of this investigation was to describe both incidental cerebrovascular findings and the morphology of the CoW on high-resolution 3T TOF-MRA in a UK tri-ethnic population-based cohort and to present updated prevalence estimates and morphologic reference values.

MATERIALS AND METHODS:

We studied participants from the UK Southall and Brent REvisited study who underwent 3T brain MRI between 2014 and 2018. TOF-MRA images were assessed for the presence of incidental cerebrovascular findings and used to determine CoW anatomy.

RESULTS:

Seven hundred fifty participants (mean age, 71.28 [SD, 6.46] years; range, 46–90 years; 337 women), 322 White Europeans, 253 South Asians, and 175 African Caribbeans were included. Incidental cerebrovascular findings were observed in 84 subjects (11.2%, 95% CI, 9.0%–13.7%; 36 women; 42.86%, 95% CI, 32.11%–54.12%), with cerebral aneurysms being the most frequent followed by intracranial arterial stenoses with the highest prevalence among South Asians compared with White European (OR: 2.72; 95% CI, 1.22–6.08; P = .015) and African Caribbean subjects (OR: 2.79; 95% CI, 1.00–7.82; P = .051). Other findings included arteriovenous malformations and infundibula. The CoW was found to be more often complete in women than in men (25.22% compared with 18.41%, P = .024) and in African Caribbean (34.86%) compared with White European (19.19%) and South Asian (14.23%) subjects (P < .001 each).

CONCLUSIONS:

Intracranial arterial stenoses were independently associated with ethnicity after adjusting for vascular risk factors, having the highest prevalence among South Asians. The prevalence of aneurysms was higher than that in previous population-based studies. We observed anatomic differences in the CoW configuration among women, men, and ethnicities.




eso

Novel pathogenic PDX1 gene variant in a Korean family with maturity-onset diabetes of the young [VARIANT DISCREPANCY RESOLUTION]

The diagnosis of maturity-onset diabetes of the young (MODY), a monogenic form of diabetes mellitus caused by a mutation in a single gene, is often uncertain until genetic testing is performed. We report a 13-yr-old Korean boy who was initially diagnosed with type 2 diabetes (T2DM). MODY was suspected because of his nonobese body habitus and family history of multiple affected members. Targeted panel sequencing of all MODY-related genes was performed using the NextSeq 550Dx platform (Illumina). Sanger sequencing was performed using blood samples from the parents, siblings, and other relatives. A frameshift variant in the 3' region of the last exon of PDX1 was detected in the patient and his family members with diabetes. PP1_Moderate criterion was applied and this variant was confirmed to be the genetic cause of diabetes in the family and classified as likely pathogenic. The study highlights the importance of genetic testing for nonobese, early-onset diabetic patients with multiple affected family members. Increased awareness and aggressive genetic testing for MODY are needed.




eso

Reclassification of the HPGD p.Ala13Glu variant causing primary hypertrophic osteoarthropathy [VARIANT DISCREPANCY RESOLUTION]

Here, we highlight the case of a 31-yr-old man who had clinical features of primary hypertrophic osteoarthropathy (PHOAR) and harbored a homozygous variant (c.38C > A, p.Ala13Glu) in the HPGD gene, as indicated by whole-exome sequencing (WES). This variant has been previously classified by our laboratory as a variant of uncertain significance (VUS). However, another patient with the same phenotype and the same homozygous variant in HPGD was subsequently reported. In reassessing the variant, the absence of this variant in the gnomAD population database, supporting computational predictions, observation in homozygosity in two probands, and specificity of the phenotype for HPGD, all provide sufficient evidence to reclassify the HPGD c.38C > A, p.Ala13Glu variant as likely pathogenic.




eso

Guidance and Resources for Family Medicine Scholarship [Family Medicine Updates]




eso

The Wholesome Competition

In order to promote the flow of soothing energies, starting October 1st all TIGS folk are wholly encouraged to consider taking part in The Wholesome Competition. Less of a bloody-toothed competition between gladiatorial rivals and more of a friendly environment to tinker away merrily on a small project with pals. A call to jolly cooperation, […]




eso

Mesopotamia Artifacts Help Explain How Language Evolved from Pictures to Words

By comparing early markings used for business purposes to 'proto' cuneiform, we can say language transitioned from symbols to writing.





eso

Guylaine Tanguay tiendra la vedette de la mouture québécoise de la comédie musicale «Ménopause»: «J’ai besoin de me mettre en danger»

Elle tiendra la vedette de l’adaptation québécoise du succès mondial Ménopause aux côtés de Claudine Mercier, Catherine Sénart et Geneviève Charest.




eso

ACRO Announces Diversity and Inclusion Site Resource Grants Program

The ACRO D&I Site Resource Grants Program aims to help sites acquire the resources and skills that will get them selected for studies and improve the reach of clinical research into underrepresented communities.

The post ACRO Announces Diversity and Inclusion Site Resource Grants Program first appeared on ACRO.




eso

ACRO Announces Diversity and Inclusion Site Resource Grants Program

ACRO is pleased to announce the launch of the ACRO Diversity and Inclusion Site Resource Grants Program! The ACRO D&I Site Resource Grants Program aims to help sites acquire the resources and skills that will get them selected for studies and improve the reach of clinical research into underrepresented communities. “We are excited to invite […]

The post ACRO Announces Diversity and Inclusion Site Resource Grants Program first appeared on ACRO.




eso

Off-Label Promotion: Best Resolved by Congress, Not Courts

On December 3, a federal appeals court ruled against one of the FDA’s untouchable restrictions on industry—thou shalt not promote the off-label use of pharmaceutical products. An industry that is little interested in constitutional law suddenly finds itself talking about the First Amendment and whether, and on what grounds, the case will be appealed. Meantime, the court’s decision left FDA Matters torn between cheering and booing. Patients are poorly served if their doctor is prescribing drugs without being able to tap into all sources of relevant knowledge. However, permitting off-label promotion undercuts the incentive for companies to thoroughly investigate the safety and efficacy of a drug for a second or third use.



  • Drug Approval and Access
  • FDA and Congress
  • FDA and Industry
  • Insight on FDA-regulated Industries

eso

Minnesota Becomes 18th State to Adopt Consumer Data Privacy Law

On May 24, Governor Tim Walz signed into law Minnesota’s new comprehensive data privacy law, the Minnesota Consumer Data Privacy Act (HF 4757 referenced as the MCDPA). The MCDPA goes into effect on July 31, 2025, with some exceptions for colleges and universities (who have until 2029). The MCDPA is similar to other state privacy laws, […]




eso

Explained | Centre and State powers over water resources

Who controls India’s water resources: Centre, States or both? How are inter-State river disputes settled? Who supplies drinking water to Indian citizens?





eso

Event Debrief: The Future of Resource Adequacy in a Decarbonized Grid

Concerns over resource adequacy during periods of peak demand or supply crises are rising with increasing deployment of renewable energy. Conleigh Byers says mandatory forward market contracts could help.





eso

CrissCross Expands Representative Payee Services to Serve as a National Resource for Qualified Beneficiaries - CrissCross Representative Payee Services

CrissCross Representative Payee Services





eso

RESOLVING TO GET HEALTHIER IN 2016? STAY ON TRACK WITH THESE QUICK TIPS! - Stay On Track With 2016 With These Quick Tips

Stay On Track With 2016 With These Quick Tips




eso

Study: Small Business Owners Are Not Taking Full Advantage of Available Resources - Kala Gibson Video

Kala Gibson, Head of Business Banking at Fifth Third Bank, discusses the importance of small businesses to our economy and communities




eso

El Proyecto Alimento: Leche para America hace un gran impacto al proporcionar leche rica en nutrientes a los bancos de alimentos del país - Barbara Bermudo nos habla sobre el regreso al colegio y la importancia de donar leche

Barbara Bermudo nos habla sobre el regreso al colegio y la importancia de donar leche




eso

El Departamento del Tesoro y el Departamento de Vivienda y Desarrollo Urbano de los Estados Unidos lanzan con el Ad Council nuevos anuncios de servicio público para ayudar a los propietarios de viviendas en dificultades - Esto es el por que :60

Esto es el por que :60




eso

Fuel Up to Play 60 Launches New Spanish-Language Resources to Encourage Healthy Lifestyles among Hispanic Youth and Communities Nationwide - VAMOS: Fuel Up to Play 60 en espa�ol

Visit FuelUpToPlay60.com to access new Spanish-language materials and get your school involved.




eso

Wellness Innovator Canyon Ranch� Debuts First International Resort In Kaplankaya, Turkey - You�re Invited

Chief Executive Officer Susan Docherty invites you to experience debut Canyon Ranch international resort: Canyon Ranch Wellness Resort at Kaplankaya in Turkey





eso

Make Horror Wholesome

With everything going on these days, sometimes it's good to give ourselves a break from the usual late night creepshow classics. Join the SA Forum photoshop goons in their quest to make horror wholesome!




eso

Some Resources to Get You Through This Bumbling Attempted Coup

U.S. District Judge Matthew W. Brann speaking to the only lawyer still willing to argue Trump's case in Pennsylvania, Rudolph Giuliani, on Tuesday:

“You’re alleging that the two individual plaintiffs were denied the right to vote. But at bottom, you’re asking this court to invalidate more than 6.8 million votes, thereby disenfranchising every single voter in the commonwealth. Can you tell me how this result can possibly be justified?”

Hello everyone. You might expect that while we are having to endure this comical yet terrifying attempted coup, my subconscious mind would be having a field day, giving me creative dreams as usual. But here's the dream I had Tuesday night, after that disgraceful show in Michigan: A Republican demagogue, anticipating his loss in the next election and wanting to prime public opinion, begins shouting as loud as he can about how the Democrats are going to steal the election. He loses the election. Then he tries to steal the election, again by accusing the Democratic victors of stealing the election. Rank-and-file Republicans fall in around him, supporting his baseless claims. A depressingly shocking number of voters believe him.

Not a lot of creativity there, subconscious.

For me, the most stressful part of all of this is how terrifying the GOP has become. A massive web of baseless lies that are believed by a gigantic number of people is terrifying. It's what my books are about. Of course, as a fantasy writer, I've always known I'm writing about real life.

 I found a recent episode of the Ezra Klein Show helpful in contextualizing the crisis that's been created by the Republican Party. In it, Ezra talks with Anne Applebaum, who studies authoritarianism. As a writer, I appreciated that the episode included a close study in character. The character of real people, of course, like Lindsey Graham and Laura Ingraham, but writers are naturally interested in the characters of real people. It's how we write believable imaginary people! Anyway, check it out if a grim perspective will help you get your feet on the ground. Don't check it out if what you need right now is comfort or reassurance, however. Those are valid needs too. And I have a couple of TV recommendations for that as well!

About a month ago, I finished watching Jane the Virgin, which now has a permanent place in the upper echelon of my favorite TV shows of all time. It is so funny, so sweet and full of heart. It has political relevance, in a way that will make you feel hopeful. It's about families, writing, relationships between women, parenthood, magic, and it has characters you'll love so much that when you finally finish the last episode, you'll wander around feeling bereft for a while, or at least that's what happened to me. The plot is so absurd that you don't have to worry too much about bad things happening. The voiceover narrator is an absolute delight. I love this show so much, and if you've never seen it before, now might be the time!

Also, last week I started watching Crash Landing on You, a South Korean TV drama in which a South Korean heiress has a hang-gliding mishap that drops her into the North Korean section of the DMZ. A very serious (and brooding) captain in the North Korean Special Police Force finds her and reluctantly decides to help her hide. It's very, very funny and keeps surprising me with its sweet moments — one of my favorite combinations in a TV show — and like with Jane, I'm falling for all the characters. Each episode seems to be incrementally longer than the last episode, to the point that my addiction to the show is interfering with the rest of my life, but I'm enjoying it too much to care. :o)

By Source, Fair use,
https://en.wikipedia.org/w/index.php?curid=62530475

These are my recommendations for today… Hang in there, everyone. ????





eso

CodeSOD: Querieous Strings

When processing HTTP requests, you frequently need to check the parameters which were sent along with that request. Those parameters are generally passed as stringly-typed key/value pairs. None of this is news to anyone.

What is news, however, is how Brodey's co-worker indexed the key/value pairs.

For i As Integer = 0 To (Request.Params().Count - 1)
    If (parameters.GetKey(i).ToString() <> "Lang") Then
        If (parameters.GetKey(i).Equals("ID")) OrElse (parameters.GetKey(i).Equals("new")) OrElse _
             (parameters.GetKey(i).Equals("open")) OrElse (parameters.GetKey(i).Equals("FID")) _
         OrElse (parameters.GetKey(i).Equals("enabled")) OrElse (parameters.GetKey(i).Equals("my")) OrElse _
         (parameters.GetKey(i).Equals("msgType")) OrElse (parameters.GetKey(i).Equals("Type")) _
         OrElse (parameters.GetKey(i).Equals("EID")) OrElse (parameters.GetKey(i).Equals("Title")) OrElse _
         (parameters.GetKey(i).Equals("ERROR")) Then
            URLParams &= "&" & parameters.GetKey(i).ToString()
            URLParams &= "=" & parameters(i).ToString()
        End If
    End If
Next

The goal of this code is to take a certain set of keys and construct a URLParams string which represents those key/values as an HTTP query string. The first thing to get out of the way: .NET has a QueryString type that handles the construction of the query string for you (including escaping), so that you don't need to do any string concatenation.

But the real WTF is everything surrounding that. We opt to iterate across every key- not just the ones we care about- and use the GetKey(i) function to check each individual key in an extensive chain of OrElse statements.

The obvious and simpler approach would have been to iterate across an array of the keys I care about- ID, new, FID, enabled, my, msgType, Type, EID, Title, ERROR- and simply check if they were in the Request.

I suppose the only silver lining here is that they thought to use the OrElse operator- which is a short-circuiting "or" operation, like you'd expect in just about any other language, instead of Or, which doesn't short circuit (pulling double duty as both a bitwise Or and a logical Or, because Visual Basic wants to contribute some WTFs).

[Advertisement] Plan Your .NET 9 Migration with Confidence
Your journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!




eso

CodeSOD: Join Our Naming

As a general rule, if you're using an RDBMS and can solve your problem using SQL, you should solve your problem using SQL. It's how we avoid doing joins or sorts in our application code, which is always a good thing.

But this is a general rule. And Jasmine sends us one where solving the problem as a query was a bad idea.

ALTER   FUNCTION [dbo].[GetName](@EntityID int)

RETURNS varchar(200)

AS

BEGIN

declare @Name varchar(200)

select @Name =
  case E.EntityType
    when 'Application'  then A.ApplicationName
    when 'Automation'   then 'Automated Process'
    when 'Group'        then G.GroupName
    when 'Organization' then O.OrgName
    when 'Person'       then P.FirstName + ' ' + P.LastName
    when 'Resource'     then R.ResourceName
    when 'Batch'        then B.BatchComment
  end
from Entities E
left join AP_Applications A   on E.EntityID = A.EntityID
left join CN_Groups G         on E.EntityID = G.EntityID
left join CN_Organizations O  on E.EntityID = O.EntityID
left join CN_People P         on E.EntityID = P.EntityID
left join Resources R         on E.EntityID = R.EntityID
left join AR_PaymentBatches B on E.EntityID = B.EntityID
where E.EntityID = @EntityID

return @Name

END

The purpose of this function is to look up the name of an entity. Depending on the kind of entity we're talking about, we have to pull that name from a different table. This is a very common pattern in database normalization- a database equivalent of inheritance. All the common fields to all entities get stored in an Entities table, while specific classes of entity (like "Applications") get their own table which joins back to the Entities table.

On the surface, this code doesn't even really look like a WTF. By the book, this is really how you'd write this kind of function- if we were going by the book.

But the problem was that these tables were frequently very large, and even with indexes on the EntityID fields, it simply performed horribly. And since "showing the name of the thing you're looking at" was a common query, that performance hit added up.

The fix was easy- write out seven unique functions- one for each entity type- and then re-write this function to use an IF statement to decide which one to execute. The code was simpler to understand and read, and performed much faster.

In the end, perhaps not really a WTF, or perhaps the root WTF is some of the architectural decisions which allow this to exist (why a function for getting the name, and the name alone, which means we execute this query independently and not part of a more meaningful join?). But I think it's an interesting example of how "this is the right way to do it" can lead to some unusual outcomes.

[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!




eso

CodeSOD: Trophy Bug Hunting

Quality control is an important business function for any company. When your company is shipping devices with safety concerns, it's even more important. In some industries, a quality control failure is bound to be national headlines.

When the quality control software tool stopped working, everyone panicked. At which point, GRH stepped in.

Now, we've discussed this software and GRH before, but as a quick recap, it was:

written by someone who is no longer employed with the company, as part of a project managed by someone who is no longer at the company, requested by an executive who is also no longer at the company. There are no documented requirements, very few tests, and a lot of "don't touch this, it works".

And this was a quality control tool. So we're already in bad shape. It also had been unmaintained for years- a few of the QC engineers had tried to take it over, but weren't programmers, and it had essentially languished.

Specifically, it was a quality control tool used to oversee the process by about 50 QC engineers. It automates a series of checks by wrapping around third party software tools, in a complex network of "this device gets tested by generating output in program A, feeding it to program B, then combining the streams and sending them to the device, but this device gets tested using programs D, E, and F."

The automated process using the tool has a shockingly low error rate. Without the tool, doing things manually, the error rate climbs to 1-2%. So unless everyone wanted to see terrifying headlines in the Boston Globe about their devices failing, GRH needed to fix the problem.

GRH was given the code, in this case a a zip file on a shared drive. It did not, at the start, even build. After fighting with the project configuration to resolve that, GRH was free to start digging in deeper.

Public Sub connect2PCdb()
        Dim cPath As String = Path.Combine(strConverterPath, "c.pfx")
        Dim strCN As String

        ' JES 12/6/2016: Modify the following line if MySQL server is changed to a different server.  A dump file will be needed to re-create teh database in the new server.
        strCN = "metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string='server=REDACTED;user id=REDACTED;database=REDACTED;sslmode=Required;certificatepassword=REDACTED;certificatefile=REDACTEDc.pfx;password=REDACTED'"
        strCN = Regex.Replace(strCN, "certificatefile=.*?pfx", "certificatefile=" & cPath)
        pcContext = New Entities(strCN)
        strCN = "metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string='server=REDACTED;user id=REDACTED;persistsecurityinfo=True;database=REDACTED;password=REDACTED'"
        strCN = Regex.Match(strCN, ".*'(.*)'").Groups(1).Value

        Try
            strCN = pcContext.Database.Connection.ConnectionString
            cnPC.ConnectionString = "server=REDACTED;user id=REDACTED;password=REDACTED;database=REDACTED;"
            cnPC.Open()
        Catch ex As Exception

        End Try
    End Sub

This is the code which connects to the backend database. The code is in the category of more of a trainwreck than a WTF. It's got a wonderful mix of nonsense in here, though- a hard-coded connection string which includes plaintext passwords, regex munging to modify the string, then hard-coding a string again, only to use regexes to extract a subset of the string. A subset we don't use.

And then, for a bonus, the whole thing has a misleading comment- "modify the following line" if we move to a different server? We have to modify several lines, because we keep copy/pasting the string around.

Oh, and of course, it uses the pattern of "open a database connection at application startup, and just hold that connection forever," which is a great way to strain your database as your userbase grows.

The good news about the hard-coded password is that it got GRH access to the database. With that, it was easy to see what the problem was: the database was full. The system was overly aggressive with logging, the logs went to database tables, the server was an antique with a rather small hard drive, and the database wasn't configured to even use all of that space anyway.

Cleaning up old logs got the engineers working again. GRH kept working on the code, though, cleaning it up and modernizing it. Updating to latest version of the .NET Core framework modified the data access to be far simpler, and got rid of the need for hard-coded connection strings. Still, GRH left the method looking like this:

    Public Sub connect2PCdb()
        'Dim cPath As String = Path.Combine(strConverterPath, "c.pfx")
        'Dim strCN As String

        ' JES 12/6/2016: Modify the following line if MySQL server is changed to a different server.  A dump file will be needed to re-create teh database in the new server.
        'strCN = "metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string='server=REDACTED;user id=REDACTED;database=REDACTED;sslmode=Required;certificatepassword=REDACTED;certificatefile=REDACTEDc.pfx;password=REDACTED'"
        'strCN = Regex.Replace(strCN, "certificatefile=.*?pfx", "certificatefile=" & cPath)
        'pcContext = New Entities(strCN)
        'strCN = "metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string='server=REDACTED;user id=REDACTED;persistsecurityinfo=True;database=REDACTED;password=REDACTED'"
        'strCN = Regex.Match(strCN, ".*'(.*)'").Groups(1).Value

        'GRH 2021-01-15.  Connection information moved to App.Config
        'GRH 2021-08-13.  EF Core no longer supports App.Config method
        pcContext = New PcEntities

        Try
            ' GRH 2021-08-21  This variable no longer exists in .NET 5
            'strCN = pcContext.Database.Connection.ConnectionString
            ' GRH 2021-08-20  Keeping the connection open causes EF Core to not work
            'cnPC.ConnectionString = "server=REDACTED;user id=REDACTED;password=REDACTED;database=REDACTED;SslMode=none"
            'cnPC.Open()
        Catch ex As Exception

        End Try
    End Sub

It's now a one-line method, with most of the code commented out, instead of removed. Why on Earth is the method left like that?

GRH explains:

Yes, I could delete the function as it is functionally dead, but I keep it for the same reasons that a hunter mounts a deer's head above her mantle.

[Advertisement] Plan Your .NET 9 Migration with Confidence
Your journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!




eso

CodeSOD: A Base Nature

Once again, we take a look at the traditional "if (boolean) return true; else return false;" pattern. But today's, from RJ, offers us a bonus twist.

public override bool IsValid
{
   get
   {
      if (!base.IsValid)
         return false;

      return true;
   }
}

As promised, this is a useless conditional. return base.IsValid would do the job just as well. Except, that's the twist, isn't it. base is our superclass. We're overriding a method on our superclass to… just do what the base method does.

This entire function could just be deleted. No one would notice. And yet, it hasn't been. Everyone agrees that it should be, yet it hasn't been. No one's doing it. It just sits there, like a pimple, begging to be popped.

[Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.




eso

CodeSOD: All the Rest Have 31

Horror movies, as of late, have gone to great lengths to solve the key obstacle to horror movies- cell phones. When we live in a world where help is a phone call away, it's hard to imagine the characters not doing that. So screenwriters put them in situations where this is impossible: in Midsommar they isolate them in rural Sweden, in Get Out calling the police is only going to put our protagonist in more danger. But what's possibly more common is making the film a period piece- like the X/Pearl/Maxxxine trilogy, Late Night with the Devil, or Netflix's continuing series of R.L. Stine adaptations.

I bring this up, because today's horror starts in 1993. A Norwegian software company launched its software product to mild acclaim. Like every company, it had its ups and downs, its successes and missteps. On the surface, it was a decent enough place to work.

Over the years, the company tried to stay up to date with technology. In 1993, the major languages one might use for launching a major software product, your options are largely C or Pascal. Languages like Python existed, but weren't widely used or even supported on most systems. But the company stayed in business and needed to update their technology as time passed, which meant the program gradually grew and migrated to new languages.

Which meant, by the time Niklas F joined the company, they were on C#. Even though they'd completely changed languages, the codebase still derived from the original C codebase. And that meant that the codebase had many secrets, dark corners, and places a developer should never look.

Like every good horror movie protagonist, Niklas heard the "don't go in there!" and immediately went in there. And lurking in those shadows was the thing every developer fears the most: homebrew date handling code.

/// <summary>
/// 
/// </summary>
/// <param name="dt"></param>
/// <returns></returns>
public static DateTime LastDayInMonth(DateTime dt)
{
	int day = 30;
	switch (dt.Month)
	{
		case 1:
			day = 31;
			break;
		case 2:
			if (IsLeapYear(dt))
				day = 29;
			else
				day = 28;
			break;
		case 3:
			day = 31;
			break;
		case 4:
			day = 30;
			break;
		case 5:
			day = 31;
			break;
		case 6:
			day = 30;
			break;
		case 7:
			day = 31;
			break;
		case 8:
			day = 31;
			break;
		case 9:
			day = 30;
			break;
		case 10:
			day = 31;
			break;
		case 11:
			day = 30;
			break;
		case 12:
			day = 31;
			break;
	}
	return new DateTime(dt.Year, dt.Month, day, 0, 0, 0);
}

/// <summary>
/// 
/// </summary>
/// <param name="dt"></param>
/// <returns></returns>
public static bool IsLeapYear(DateTime dt)
{
	bool ret = (((dt.Year % 4) == 0) && ((dt.Year % 100) != 0) || ((dt.Year % 400) == 0));
	return ret;
}

For a nice change of pace, this code isn't incorrect. Even the leap year calculation is actually correct (though my preference would be to just return the expression instead of using a local variable). But that's what makes this horror all the more insidious: there are built-in functions to handle all of this, but this code works and will likely continue to work, just sitting there, like a demon that we've made a pact with. And suddenly we realize this isn't Midsommar but Ari Aster's other hit film, Hereditary, and we're trapped being in a lineage of monsters, and can't escape our inheritance.

[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!




eso

CodeSOD: A Matter of Understanding

For years, Victoria had a co-worker who "programmed by Google Search"; they didn't understand how anything worked, they simply plugged their problem into Google search and then copy/pasted and edited until they got code that worked. For this developer, I'm sure ChatGPT has been a godsend, but this code predates its wide use. It's pure "Googlesauce".

    StringBuffer stringBuffer = new StringBuffer();
    stringBuffer.append("SELECT * FROM TABLE1 WHERE COLUMN1 = 1 WITH UR");

    String sqlStr = stringBuffer.toString();
    ps = getConnection().prepareStatement(sqlStr);

    ps.setInt(1, code);

    rs = ps.executeQuery();

    while (rs.next())
    {
      count++;
    }

The core of this WTF isn't anything special- instead of running a SELECT COUNT they run a SELECT and then loop over the results to get the count. But it's all the little details in here which make it fun.

They start by using a StringBuffer to construct their query- not a horrible plan when the query is long, but this is just a single, simple, one-line query. The query contains a WITH clause, but it's in the wrong spot. Then they prepareStatement it, which does nothing, since this query doesn't contain any parameters (and also, isn't syntactically valid). Once it's prepared, they set the non-existent parameter 1 to a value- this operation will throw an exception because there are no parameters in the query.

Finally, they loop across the results to count.

The real WTF is that this code ended up in the code base, somehow. The developer said, "Yes, this seems good, I'll check in this non-functional blob that I definitely don't understand," and then there were no protections in place to keep that from happening. Now it falls to more competent developers, like Victoria, to clean up after this co-worker.

[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!