NYC's forensics tool source code released by court order

archive.fo/aEjqm

Wanna see the pajeetcode that sends people to jail for life?
github.com/propublica/nyc-dna-software

Other urls found in this thread:

github.com/propublica/nyc-dna-software/blob/master/FST.Common/IndividualReportPrinter.cs
github.com/propublica/nyc-dna-software/blob/master/FST.Common/ComparisonData.cs#L63
github.com/propublica/nyc-dna-software/issues/1
twitter.com/NSFWRedditGif

HAHAH Indians bad at code hahah do I fit in yet guys?

If they are black, they're guilty of something though, best keep them locked-up to err on the side of caution.

github.com/propublica/nyc-dna-software/blob/master/FST.Common/IndividualReportPrinter.cs

/// UGLY HACK: we hide the second page from the PDF report for the Identifiler kit that doesn't have all the loci... I am sorry for doing this, but it works List PageIndices = new List(bytes.Locate(ASCIIEncoding.Default.GetBytes("/Pages "))); List CountIndices = new List(bytes.Locate(ASCIIEncoding.Default.GetBytes("/Count ")));

Pajeeeeeeeeeeet!!!!!

YEAR OF THE LINUX COP

/// /// This function picks up the no of persons involved in a case /// Added by Dhruba /// /// ///
Literally, Pajeet.

///Objective : This screen interacts with the database through the procedures and is the Database Layer///Developed by : Vivien Song///First Developed on : 7/24/2009///Modified by : Dhrubajyoti Chattopadhyay///Last Modified On : 1/14/2010

You just can't make this shit up.

Nah, it's all .NET C# stuff.

There's a lot of DB queries being made by simple string joins, I hope Pajeet sanitized his inputs. I haven't used C# before, but I didn't see any prepared statements being used, which help mitigate SQL injections.

pajeet pls.xcf

/// /// Default consturctor initiates a conenction to the database ///

Magical.

// if we have a single value then we duplicate it (sorry for this) foreach (DataColumn dc in dt.Columns) if (dc.ColumnName != "ID" && dc.ColumnName != "Ethnicity") if (!dr[dc.ColumnName].ToString().Contains(",") || string.IsNullOrEmpty(dr[dc.ColumnName].ToString().Trim().Split(new char[] { ',' })[1])) if (!dr[dc.ColumnName].ToString().Contains(",") || string.IsNullOrEmpty(dr[dc.ColumnName].ToString().Trim().Split(new char[] { ',' })[1])) dr[dc.ColumnName] = dr[dc.ColumnName].ToString().Trim().Replace(",", "") + "," + dr[dc.ColumnName].ToString().Trim().Replace(",", "");

public string SaveLabKit(string labKitName, string creator) { string strResult = ""; strResult = m_dbinstance.SaveLabKit(labKitName, creator); return strResult; } public void SaveLabKitData(string guid, DataTable dropOuts, DataTable dropIns, List labKitLoci) { string strResult = ""; strResult = m_dbinstance.SaveLabKitData(guid, dropOuts, dropIns, labKitLoci); }

He does this a lot too. A simple return would suffice, but perhaps this boilerplate was generated by his IDE. In any case, the compiler elides such silliness, but it's ugly to view.

public DataTable GetDropOutTypes() { DataTable dt = m_dbinstance.GetDropOutTypes(); return dt; } public DataTable getDropOutOptions() { DataTable dt = m_dbinstance.getDropOutOptions(); return dt; }

// holds our comparisonID so the property below can have some other code in the setter method private int compareMethodID; // hack around serializer limits public int compareMethodIDSerializationBackupDoNotMessWithThisVariableBecauseItsAnUglyHackAroundACrappyLimitiationOfTheFCLsCrappyXMLSerializer; // this method calls the configureComparison() method public int CompareMethodID { get { return compareMethodID != 0 ? compareMethodID : compareMethodIDSerializationBackupDoNotMessWithThisVariableBecauseItsAnUglyHackAroundACrappyLimitiationOfTheFCLsCrappyXMLSerializer; } set { configureComparison(value); } }

Into the trash it goes

Yeeeeeesssssssss!!!!!!!! This is what I was looking for, the CS GRAD SOLUTION.

// copy the comparisons alleles from the dictionaries if (this.ComparisonAlleles.Count >= 1) { DataRow dr = dtAlleles.NewRow(); dr["Type"] = this.Comparison1Name != string.Empty ? string.Format("{0} (Comparison)", this.Comparison1Name) : string.Format("Comparison{0}", this.NumeratorProfiles.ComparisonCount > 1 ? " 1" : string.Empty); dr["Profile"] = string.Empty; foreach (string locus in loci) if(ComparisonAlleles[1].ContainsKey(locus)) dr[locus] = ComparisonAlleles[1][locus]; dtAlleles.Rows.Add(dr); } if (this.ComparisonAlleles.Count >= 2) { DataRow dr = dtAlleles.NewRow(); dr["Type"] = this.Comparison2Name != string.Empty ? string.Format("{0} (Comparison)", this.Comparison2Name) : "Comparison 2"; dr["Profile"] = string.Empty; foreach (string locus in loci) if (ComparisonAlleles[2].ContainsKey(locus)) dr[locus] = ComparisonAlleles[2][locus]; dtAlleles.Rows.Add(dr); } if (this.ComparisonAlleles.Count >= 3) { DataRow dr = dtAlleles.NewRow(); dr["Type"] = this.Comparison3Name != string.Empty ? string.Format("{0} (Comparison)", this.Comparison2Name) : "Comparison 3"; dr["Profile"] = string.Empty; foreach (string locus in loci) if (ComparisonAlleles[3].ContainsKey(locus)) dr[locus] = ComparisonAlleles[3][locus]; dtAlleles.Rows.Add(dr); } if (this.ComparisonAlleles.Count >= 4) { DataRow dr = dtAlleles.NewRow(); dr["Type"] = this.Comparison4Name != string.Empty ? string.Format("{0} (Comparison)", this.Comparison2Name) : "Comparison 4"; dr["Profile"] = string.Empty; foreach (string locus in loci) if (ComparisonAlleles[4].ContainsKey(locus)) dr[locus] = ComparisonAlleles[4][locus]; dtAlleles.Rows.Add(dr); }

...

If I had to guess a pajeet cianigger wrote this miserable pile of copy pasted shit.

Oh shit, look at the Switch statement on line 63.
github.com/propublica/nyc-dna-software/blob/master/FST.Common/ComparisonData.cs#L63

Coding horror.

I'll give you guys a taste, there's 38 of these cases...
case 20: NumeratorProfiles.ComparisonIDs.Add(1); NumeratorProfiles.KnownIDs.Add(1); NumeratorProfiles.KnownIDs.Add(2); NumeratorProfiles.KnownIDs.Add(3); DenominatorProfiles.KnownIDs.Add(1); DenominatorProfiles.KnownIDs.Add(2); DenominatorProfiles.KnownIDs.Add(3); CompareMethodLongName = "Comparison + 3 Knowns / 3 Knowns"; CompareMethodShortName = "C + 3 K / 3 K"; hpHeadFormatString = "{0} (Comparison) + {4} (Known) + {5} (Known) + {6} (Known)"; hdHeadFormatString = "{4} (Known) + {5} (Known) + {6} (Known)"; break; case 21: NumeratorProfiles.ComparisonIDs.Add(1); NumeratorProfiles.UnknownCount = 1; DenominatorProfiles.UnknownCount = 1; CompareMethodLongName = "Comparison + Unknown / Unknown"; CompareMethodShortName = "C + U / U"; hpHeadFormatString = "{0} (Comparison) + Unknown"; hdHeadFormatString = "Unknown"; break; case 22: // this is an example with two comparisons NumeratorProfiles.ComparisonIDs.Add(1); NumeratorProfiles.ComparisonIDs.Add(2); DenominatorProfiles.UnknownCount = 2; CompareMethodLongName = "2 Comparisons / 2 Unknowns"; CompareMethodShortName = "2 C / 2 U"; hpHeadFormatString = "{0} (Comparison) + {1} (Comparison)"; hdHeadFormatString = "2 Unknowns"; break;

Cianigger skill level confirmed, the line.

// copy the evidence dictionary Dictionary tmpEvidenceAllelesProxy = new Dictionary(); foreach (string key in EvidenceAlleles.Keys) { Dictionary curDict = EvidenceAlleles[key]; DictionaryProxy tmpDict = new DictionaryProxy(curDict); tmpEvidenceAllelesProxy.Add(key, tmpDict); } EvidenceAllelesProxy = new DictionaryProxy(tmpEvidenceAllelesProxy); // copy the comparisons dictionary Dictionary tmpComparisonAllelesProxy = new Dictionary(); foreach (int key in ComparisonAlleles.Keys) { Dictionary curDict = ComparisonAlleles[key]; DictionaryProxy tmpDict = new DictionaryProxy(curDict); tmpComparisonAllelesProxy.Add(key, tmpDict); } ComparisonAllelesProxy = new DictionaryProxy(tmpComparisonAllelesProxy); // copy the knowns dictionary Dictionary tmpKnownsAllelesProxy = new Dictionary(); foreach (int key in KnownsAlleles.Keys) { Dictionary curDict = KnownsAlleles[key]; DictionaryProxy tmpDict = new DictionaryProxy(curDict); tmpKnownsAllelesProxy.Add(key, tmpDict); } KnownsAllelesProxy = new DictionaryProxy(tmpKnownsAllelesProxy);
// copy the evidence Dictionary tmpEvidenceAllelesProxy = val.EvidenceAllelesProxy.ToDictionary(); foreach (string key in tmpEvidenceAllelesProxy.Keys) { Dictionary curDict = tmpEvidenceAllelesProxy[key].ToDictionary(); val.EvidenceAlleles.Add(key, curDict); } // copy the comparisons Dictionary tmpComparisonAllelesProxy = val.ComparisonAllelesProxy.ToDictionary(); foreach (int key in tmpComparisonAllelesProxy.Keys) { Dictionary curDict = tmpComparisonAllelesProxy[key].ToDictionary(); val.ComparisonAlleles.Add(key, curDict); } // copy the knowns Dictionary tmpKnownsAllelesProxy = val.KnownsAllelesProxy.ToDictionary(); foreach (int key in tmpKnownsAllelesProxy.Keys) { Dictionary curDict = tmpKnownsAllelesProxy[key].ToDictionary(); val.KnownsAlleles.Add(key, curDict); }
Copy-pasting is a powerful programming technique.
t. Rajesh

After beholding that awful switch, I had to close the tab, and peruse some fine scheme. It beggars belief what horrors lie deeper in the Ganges abyss.

...

It's like how Holla Forums is always right about the Jews, Holla Forums is always right about the Indians

Other than creating a and adding new row every if statement rather than having them be in their respective spots above and below the block and having >= as operators, how else could this be improved?

Loop from HIGH to LOW, access the constants he needs from an arrays indexed by the loop variable.

His this.Comparison1Name shit should be turned into an array.

Well then. You are fucked. At least i have Jewish friends.

I thought this kind of shit poo was just a meme.

What a surprise.

wake me up

...

/// /// This helper class is used to find patterns in byte arrays. Found on stack overflow. Thank you, Internet! /// static class ByteArrayHelper/// /// This is called by Windows when the service is stopped./// protected override void OnStop()// start our threadsdequeuerThread.Start();

Gee they sure know how to use comments.

...

...

And now you know why they need a meme language.

github.com/propublica/nyc-dna-software/issues/1
lel
MIT cuck doesn't know that proprietary licenses doesn't give a dam.
Even if the MIT license stipulates that there's no legal action possible because the MIT just like the BSD is permissive there's nothing that can be done.

If she's a dev from the US there's nothing wrong (well except if she's bad)
But the pajeet is inexcusable.

...

Yes they exist, just like good pajeets (even tho I know only two good ones).
Good female devs are either very autistic, have health related problem that don't let them go outside or are housewife that don't have much to do.

They do exist, but diversity hires have ruined their reputation. Twenty years ago you could assume that a female programmer was hired based on merit, now it's much more likely that she was hired because of her "diversity".

One nigger I knew was really mad when they started with the quotas since he knew everyone would think he was there for being a nigger instead of making it on his own. He was right.

Exactly. If you saw her, you assumed she was good, or why would she even be there in the first place.

I imagine this is the case for all intelligent "marginalized groups".

*people from "marginalized groups".

Yes.

Wouldn’t it take like a minute to just copy this.ComparisonAlleles.count
Intro the brackets, make an array/vector for this.Comparison[x]Name and delete all the repeated shit and the conditional?

Haha and when it failed, I'll swoop in and fix it for 150/hr if they don't agree to a re-write! I never knew autism would be this profitable.

No kidding. Pajeet has to copy+paste fast though.

I want Holla Forums to stop being right all the time.

as a pajeet, I am ashamed of this.

the only way this is redeemable is if more niggers ended up in prison because of this

Tip top kek.
Now that we're on this topic, can someone explain the "x != 0 ? x : y" syntax? I've seen that sort of thing a few times and it appear to be another way of writing if(x != 0) x = y

Ternary operator.

Thanks, senpai.

Excuse me, this is not ECMAScript safe. What you're referring to as
if(x !=0) x = y
is actually
if (x !== 0) { x = y };

They are not your friends.

Why in the fuck was a tool used to generate evidence for criminal trials closed source in the first place?

jesus christ

OOOHHH SAAAYYYY CAAANNN YOUUUUUU SEEEEEEEEEEE

That pic is highly underrated. Thanks for my new research station name.

...

That pajeet code, how much do they pay?