By the way, I just checked. The DataCleanup() method is called 18,098 times in our codebase. It's not some cherry-picked monstrosity form the bowels of the codebase no one ever uses. It's a core function that's used a lot.
Posts made by Pharylon
-
RE: Some (More) AntiPatterns At My Job
-
RE: Git help - branches with no commits?
Demonstrably not. Since I've been working with for for a lot closer to 400 hours than 1, and I didn't know it until yesterday. (I'm not sure I've ever worked with a Git repo that had a branch named "master" in it, honestly. The one 3 jobs ago I don't remember with crystal clarity, it might have had "master".)
But hey I guess I'm just stupid retard dumb-o man. Obviously that's the only possible explanation, since Git is SO intuitive and easy-to-use.
I realize you're arguing with several people, so maybe you're confused about what I said. I never said git was easy. It's hard. It's a very powerful tool, but ease of use isn't one of it's big features.
-
RE: Git help - branches with no commits?
The phrase "the master branch" implies something different than a branch that merely named "master". For all I knew, our "Development" branch was "the master branch".
My point is, that's 101 stuff. It doesn't take 400 hours to learn that. It takes one.
-
RE: Git help - branches with no commits?
I think you're in a "shitty open source developer who doesn't give a shit about software quality" mindset.
It was late, and I've spent the last few years working on an in-house web app where there's only one current version. Fuck off. Sorry for trying to understand your poorly worded question and give you a hand.
Maybe next time, you should read any absolute beginner tutorial on git before asking questions and looking like an idiot yourself. "Waaaa, I didn't understand what you meant because I don't have a 'master' branch". That sounds like giving someone a code snippet for string splitting and seeing them reply, "But I don't have a variable called 'myString'!"
-
RE: Git help - branches with no commits?
adorable. Have a lollipop.
Most webapp development doesn't really have to consider more than one actual deployment. Building webapps for other organisations to deploy is a horse of an entirely different colour
Thanks! Mmmmm... Tastes like merge conflict.
-
RE: Git help - branches with no commits?
Ah, yeah, that makes sense. I wasn't thinking about doing hotfixes for old releases. I guess I was just in a web app mindset where there's only one current version.
So I guess he's looking for all branches that aren't in the history of any other branch.
-
RE: Git help - branches with no commits?
... right, but then you're not getting my point that I can't just look for branches that are merged into development, I need to find branches that are merged into development or any of the release/vX.Y branches. Which apparently is impossible?
Wait, so you're saying that the development branch doesn't have the release/vX.Y branches in its history? How does that work? Let's say you create a new branch off of development called release/v3.2. It doesn't have the release/v2.7 branch in it's history?
-
RE: Some (More) AntiPatterns At My Job
I don't feel we can blame this all on VB6 exposure. I'm sure some people wrote good VB6 code... somewhere.
Also, the generics there at the end. Seriously... not a feature of VB6. It's just someone learned about generics and decided they'd found a super awesome use-case.
-
RE: SQL All the things!
Yet Stack Overflow is lightening fast and deals with boatloads of data.
-
RE: Some (More) AntiPatterns At My Job
Was doing things like passing all sql parameters in as strings necessary in VB6? Maybe. I'm not sure either. The DataCleanup method isn't VB-like at all, though. It's just.... bad.
-
RE: Some (More) AntiPatterns At My Job
Hmmm. Why isn't the code highlighting working?
-
Some (More) AntiPatterns At My Job
At my current employer, I'm surrounded by old-timers who don't want to change their ways. It's not an exaggeration to say about a third of my company got their start on punch cards.
For a long time, everything here was in VB6 before eventually being rewritten in C# (they're just finishing up the conversion this year!). But a lot of code is still very.... VBish. But mostly just bad.
I don't deal with most of that, thouigh. I do the web development, and get to use pretty much whatever tools I want (though I keep the backend in C#, because honestly I love the language). For a while it was myself and a long term contractor, but he left a few months ago. As a Big Project had just completed, they decided not to replace him, but instead I get to cross-train someone from the "Operational Package" team. I got my hands on the one young guy over there (this is his first programming job), as I view him as... salvageable. He's picked up some bad habits from them, but he seems smart enough. We're doing code reviews (something the operational package team doesn't do), in part to try and correct some issues.
So, I get my first pull request form him today, and look through the code to find this gem. He was calling this "DataCleanup()" mehod constantly. He copy/pasted this from the Operational Package code, where it's called on every sql parameter before it goes in, and it's called on every field that comes out before it's hydrated in an object. For instance:
command.Parameters.AddWithValue("Origin", DataAccessHelper.DataCleanup<string>(rate.Origin));
or:
result.Origin = DataAccessHelper.DataCleanup<string>(_reader["Origin"]); result.TransitDays = DataAccessHelper.DataCleanup<int>(_reader["TransitDays"]); result.IsHazardous = DataAccessHelper.DataCleanup<bool>(_reader["IsHazardous"]);
So, what does this magic DataCleanup function do? Well, let's take a stroll through the DataAccessHelper class! All the comments here are mine.
//Note that all the methods are static, but the class itself isn't. public class DataAccessHelper { private static readonly string DateFormatShort = "MM/dd/yyyy"; private static readonly string DateFormatLong = "MM/dd/yyyy hh:mm:ss.fff tt"; private static readonly DateTime MinimumDate = new DateTime(1900, 1, 1); private static readonly CultureInfo UserCultureInfo = new CultureInfo("en-US"); //This method is used for turning decimals into strings before we //use them as sql parameters because reasons. public static string ParseDecimalToDatabaseFormatParameter(decimal value, string defaultValue = "0") { string tempValue = string.Empty; decimal resultingValue; //We are literally calling toString() on a decimal and then parsing it back into a decimal again. bool isValid = decimal.TryParse(value.ToString(), out resultingValue); if (isValid) { //After all that, if it's a 0, we return the "defaltValue", which unless //an optional parameter supplied will just be "0". They could literally have //just called myDecimal.ToString() in most cases. tempValue = (resultingValue == 0) ? defaultValue : resultingValue.ToString(); } //This is, obviously, impossible. isValid will always be true. else { tempValue = defaultValue; } return tempValue; } //Sniping the methods 'ParseInt16ToDatabaseFormatParameter', 'ParseInt32ToDatabaseFormatParameter', //and ParseDateTimeEndToDatabaseFormatParameter... I'm sure you can guess what they look like //(hint, they all call ToString() on the supplied value and parse it back). public static string ParseDateTimeEndToDatabaseFormatParameter(DateTime? value) { string tempValue = string.Empty; if (IsDate(value)) { //The next 3 lines of comments aren't mine. // This did not work. The value was set to SQL as '2012-01-29 23:59:59.900 P1' //tempValue = value.Value.ToString("yyyy-MM-dd 23:59:59.900 PM"); //DateTime lDateTime = new DateTime(value.Value.Year, value.Value.Month, value.Value.Day, 23, 59, 59, 990); DateTime lDateTime = new DateTime(value.Value.Year, value.Value.Month, value.Value.Day, 0, 0, 0, 0); lDateTime = lDateTime.AddDays(1); tempValue = lDateTime.ToString(DateFormatLong); } //Yup, this is still impossible. else { tempValue = null; } return tempValue; } //What the fuck is this? Why is 1/1/1900 acceptable and 1/2/1900 isn't??? //Why is ToString() being called on the DateTiems for comparison??? public static string ParseDateTimeToDatabaseFormatParameter2(DateTime? value) { string tempValue = (value != null) ? value.ToString() : "01/02/1900"; DateTime mydatetime; DateTime.TryParse(tempValue, out mydatetime); if (mydatetime.ToString("MM/dd/yyyy") == "01/02/1900" || mydatetime.ToString("MM/dd/yyyy") == "01/01/0001") { tempValue = null; } else { tempValue = mydatetime.ToString(DateFormatLong); } return tempValue; } //String is trimed twice (once in that horrible double ternary at the top and again at the bottom). //Also, if removeCharacter is false, why do the foreach loop at all? public static string StringCleanup(string value, bool removeCharacters = false, bool trim = false) { //Seriuosly, what is it with my job and the weird Hungarian Notation? string lStringValue = (value != null) ? (trim) ? value.Trim() : value : string.Empty; StringBuilder newString = new StringBuilder(); foreach (char lChar in lStringValue.ToCharArray()) { switch (lChar) { case '\t': case '\r': case '\n': if (!removeCharacters) { newString.Append(" "); } break; default: newString.Append(lChar); break; } } return (trim) ? newString.ToString().Trim() : newString.ToString(); } //This method determines if an object is either a DateTime or a string that //represents one. Because, you know, this is the best way to determine that. public static bool IsDate(object obj) { DateTime lDateTime; if (obj == null) { return false; } else if (obj.GetType() == typeof(DateTime)) { //Gotcha! Despite the name of the method, in additon to checking if it's a DateTime, //it also does validation to make sure it's greater than the TSQL default and less //than the .NET maximum. lDateTime = (DateTime)obj; if (lDateTime > MinimumDate && lDateTime < DateTime.MaxValue) { return true; } return false; } else if (obj.GetType() == typeof(DateTime?)) { DateTime? nullableDate = obj as DateTime?; //Of course, we already checked if the object was null, but can't hurt to check again! if (nullableDate != null && nullableDate > MinimumDate && nullableDate < DateTime.MaxValue) { return true; } return false; } string strDate = obj.ToString(); //I don't even want to know what kind of hell on earch requires this kind of parsing logic. //I'll just leave this here. try { string[] stringSplit = strDate.Split('/'); if (stringSplit.Length == 3 && stringSplit[2].Length >= 4) { string[] stringSplitYearAndTimePart = stringSplit[2].Split(new char[] { ' ', ':', '.' }); if (stringSplitYearAndTimePart.Length > 0) { int month, day, year; if (int.TryParse(stringSplit[0], out month) == true && int.TryParse(stringSplit[1], out day) == true && int.TryParse(stringSplitYearAndTimePart[0], out year) == true) { if (month > 0 && month < 13 && year >= MinimumDate.Year && year <= DateTime.MaxValue.Year) { if (DateTime.TryParseExact(strDate, DateFormatLong, Thread.CurrentThread.CurrentCulture, DateTimeStyles.AllowWhiteSpaces, out lDateTime) && lDateTime > MinimumDate && lDateTime < DateTime.MaxValue) { return true; } else if (DateTime.TryParseExact(strDate, DateFormatShort, Thread.CurrentThread.CurrentCulture, DateTimeStyles.AllowWhiteSpaces, out lDateTime) && lDateTime > MinimumDate && lDateTime < DateTime.MaxValue) { return true; } else if (DateTime.TryParse(strDate, out lDateTime) && lDateTime > MinimumDate && lDateTime < DateTime.MaxValue) { return true; } } } } } return false; } finally { //Gotta love the try/finally with an empty finally. } } //Now for the Piece de Resistance. This is the method I mentioned at the top that gets //called on everything going in or out of SQL in the Operational Package //This will check of the object is "valid" and if not return the defaultValue. public static T DataCleanup<T>(object value, T defaultValue = default(T)) { Type objectType = typeof(T); bool isNullableType = Nullable.GetUnderlyingType(objectType) != null; objectType = Nullable.GetUnderlyingType(objectType) ?? objectType; T returnValue = defaultValue; try { if (isNullableType && (value == null || DBNull.Value.Equals(value))) { returnValue = defaultValue; } else if (objectType == typeof(String)) { //Note that even if you passed null in as the defaultValue, this method's opinion is //you can suck it and take an empty string. Apparently they almost never put nulls //into the database. It's always empty strings. string lString = (value != null) ? value as string : (defaultValue != null) ? defaultValue as string : string.Empty; returnValue = (T)System.Convert.ChangeType(StringCleanup(lString, true, true), typeof(string), UserCultureInfo); } else if (objectType == typeof(DateTime)) { DateTime myDateTime; //Somehow, this line is actually necessary. But only //becuase the rest of this mehtod is so fucked up. DateTime lDefaultDateTime = (!defaultValue.Equals(default(T))) ? (DateTime)System.Convert.ChangeType(defaultValue, typeof(DateTime), UserCultureInfo) : MinimumDate; if (value == null) { //Here, if you suplied "foo" for the defaultValue, but if the value object //was a DateTime, a method meant to 'clean up' the Data will explode. returnValue = (T)System.Convert.ChangeType(lDefaultDateTime, typeof(DateTime), UserCultureInfo); } else if (IsDate(value) == true) { if (value.GetType() == typeof(DateTime)) { //On this line, we (A) call ToString() on a DateTime, (B)parse that string //back into a DateTime, then we(C) run that DateTime through Convert.ChangeType //to change a DateTime into....a DateTime???? Am I missing something here???????? returnValue = (DateTime.TryParse(value.ToString(), out myDateTime) && myDateTime > lDefaultDateTime) ? (T)System.Convert.ChangeType((DateTime)value, typeof(DateTime), UserCultureInfo) : (T)System.Convert.ChangeType(lDefaultDateTime, typeof(DateTime), UserCultureInfo); } else { //Have they ever heard of Convert.ToDateTime()???? returnValue = (DateTime.TryParse(value.ToString(), out myDateTime) && myDateTime > lDefaultDateTime) ? (T)System.Convert.ChangeType(myDateTime, typeof(DateTime), UserCultureInfo) : (T)System.Convert.ChangeType(lDefaultDateTime, typeof(DateTime), UserCultureInfo); } } else { //This ternary should always evaluate false. The IsDate() method above //already determined it couldn't be parsed into a DateTime, right? //Although, admitedly, IsDate() is so fucked up it could well have failed, so hey. //Truly, this is madness. returnValue = (DateTime.TryParse(value.ToString(), out myDateTime) && myDateTime > lDefaultDateTime) ? (T)System.Convert.ChangeType((DateTime)value, typeof(DateTime), UserCultureInfo) : (T)System.Convert.ChangeType(lDefaultDateTime, typeof(DateTime), UserCultureInfo); } } else if (objectType.IsEnum && Enum.IsDefined(objectType, value)) { //Enums can't be null! What the fuck is wrong with these people? //Plus, if it was null, it'd have been caught earlier in the method. return (value != null) ? (T)value : defaultValue; } else { returnValue = (value != null && !DBNull.Value.Equals(value) && value.ToString().Length > 0) ? (T)System.Convert.ChangeType(value, objectType, UserCultureInfo) : (!defaultValue.Equals(default(T))) ? defaultValue : default(T); } } catch (Exception) { //Aaaaand the try/catch ends with just re-throwing. throw; } //Overall, why hy have one long method for multiple types. Why not a "StringCleanup()" //and a separate "DateTimeClenup()"? It's like someone discovered generics and was all //like "I know just what to do with these!!! Wheeeee!!!!" return returnValue; } }
-
How to Async
Found in real world production code:
public class ServiceWrapper { //The variable below is hard to read, but if it was camel-case, this would be a bool called //"formHasSoapCompleted1". The name alone should send chills down your spine. Honestly, the //only good thing here is that there is no "formhassoapcompleted2" bool formhassoapcompleted1 = false; //Ah, love that 'l' Hungarian notation. Because it's a local variable, I guess. As opposed to the //globals that don't really exist in C#. PriceSheet[] lPrcSheets; //snip out a dozen or so other state variables. public string InvokeSoap(methodArgs args) { //do some logging, etc soapClient client = new Client(); client.doThingCompleted += new doThingEventHandler(MyCompletionMethod); client.doThingAsync(args); formhassoapcompleted1 = false; do { string busyWork = ""; } while (formhassoapcompleted1 == false) return lPrcSheets; } private void MyCompletionMethod(object sender, completedEventArgs e) { //In actuality, there's a couple hundred lines of code to transform //SOAP client's class into ours, but I'll have mercy and omit that //so you can see basically how this delegate works. lPrcSheets = e.priceSheets; formhassoapcompleted1 = true; } }
Interestingly, the while loop gets optimized into an infinite loop when you compile for Release. They hadn't noticed it before because the production code was running in Debug mode.
-
RE: Do nothing without doing anything
The other day, I almost left a bunch of code commented out "just in case".
But than I remembered stories like this, and deleted the fuck out of that garbage. Not on my watch, legacy code.
And it was all thanks to WTDWTF!
How to Refactor Code
- Comment the old code out.
- Write new code while using the commented code for reference.
- Forget to delete the commented code.
-
RE: There is no C# on Linux - or is there?
I wouldn't use Mono either, but that's more because it's barely got support for stuff beyond .NET 2.0, and there's so much good stuff in 3.5, 4.0, and later that I'd rather not do without. Plus 5.0 isn't that far away.
The new .NET Core libraries are cross-platform from the ground up, with no dependency on the "legacy" .NET Framework. They're being pushed mostly for ASP .NET 5 (currently in Release Candidate), but you can write Console applications just fine with them. There's no webforms/wpf/etc for them, but hey. It's C# on Linux, and no Mono required either.
It's also gone a long way to developing C# without Visual Studio too. If you really want, you can do it in Atom or VIM or whatever these days, and still get Intellisense from Omnisharp. Or you can use their cross-platform "Visual Studio Code" (which is basically a C#-centric Atom clone) and it even does debugging!
-
RE: Finding (and getting) a beginner/entry level programming job
Hm, maybe. I need to see if any of those things exist around here - although since there's at least three colleges/universities in the area, I suspect so.
Thanks.
-
RE: Finding (and getting) a beginner/entry level programming job
I was in a similar situation when I was looking for my first programming job. My suggestion is to network some. Find the local hackerspace/makerspace and drop by. I guarantee you'll find some programmer types who need help with an open source project or something to benefit a school or whatever.
You then get experience working with someone on a project, some guidance growing as a programmer, and something you can put on a resume.
-
RE: Some Anti-Patterns At My Job
And in a couple of cases they use 0 as the 'true' value and 1 as the 'false' value.
That's probably the worst part.
-
RE: Some Anti-Patterns At My Job
In my very personal opinion, for loops are stupid anyway. Having three different statements in one line decreases readability. There should only be foreach loops (+integer ranges) and while loops.
I could get on board with that.
foreach (var i in Enumerable.Range(0, 100)) { }
-
RE: Some Anti-Patterns At My Job
What's amazing is that whoever wrote this is obviously aware of the XmlDocument class, and yet somehow still does string concat to generate XML. It's mind-blowing. Even when he knows about all the correct tools to use, he's not using them.
I know you anonymized this, but I hope lGotOne is in class-scope (instead of you just accidentally removing the declaration), because that'd really add to the WTF factor here.
lGotOne is indeed local. I took out the declaration when I took out all the other dozen local variables defined at the top of the function.
And yeah, right there at the end of the function, we have
lxmlDoc.LoadXml(XML); return lxml;
-
RE: Some Anti-Patterns At My Job
and again with foreach, given it's designed for IEnumberable
Actually, amazingly enough, ADODB.Recordset isn't enumerable, as it's an interface from "classic" asp (yes, it's a built-in Interface without an "I" in front of the name).
That was only added in .NET 4.0 - hopefully this simply predates that...
Most of it is. But it's all pretty much .NET 2.0 and later, and that includes
string.IsNullOrEmpty()
. -
RE: Some Anti-Patterns At My Job
It's one of the worst Hungarian abominations - a pre-prefix denoting scope. l = local, g = global and m = module.
Ahhhh... that makes sense! I mean, kind of.
-
RE: Some Anti-Patterns At My Job
I ask every job candidate to demonstrate De Morgan's laws. I don't care if they don't recognize the name, but if they can't reverse an if statement they don't get the job.
You mean... put an exclamation mark in front of it?
-
RE: Some Anti-Patterns At My Job
You can get syntax highlighting in code blocks if you delimit the code with opening and closing triple backticks (```) and put the language name directly after the opening triple backtick.
Thanks.
-
Some Anti-Patterns At My Job
A few of my favorite anti-patterns I've seen at my job. Note that this is an (abbreviated) real function, and not even especially cherry-picked.
//We're starting off with a bang! PascalCase arguments (C# convention is camelCase for arguments) and //RefNumber is misspelled. public static XmlDocument GetTrackingXMLWidget(string BookNumber, string RefNumbert) { //Now, for some reason we don't want to use the BookNumber string directly, so let's create a //new variable called tmpBookNumber, and put it in. Oh, and let's call ToString() on a string, just //just in case. We'll do this a lot. Always call ToString() on strings when assigning them to other //other strings. string tmpBookNumber = bookNumber.ToString().Trim(); //Better call ToString() on it again before we check the length! if (tempBookNumber.ToString().Length == 0) { XML += "<CombinedRates>"; XML += "<BestRates>"; XML += "<BestRate>"; XML += "<Errors>"; //Write some "XML" using fifty lines of string concatenation. } var myobject = new Vb6DllObject(); myadorecordset = new ADODB.Recordset(); myadorecordset = myobject.QuickBookingList(ref tmpBookNumber, ref tmpRefNumber, ref connectstring); if (myadorecordset == null || (myadorecordset.EOF && myadorecordset.BOF)) { //Blank! The if is blank!!!! } else { //Actual logic is here. Why not just reverse the if statement??? //Anyway, for some reason, we're going to start most of our variables with 'l', like it was Hungarian //Notation, except they always start with 'l'. Always. Longs? 'l'. But bools, string, and objects do too. lGotOne = true; //OK, these next two lines seem redundant, but maybe it's required by the ancient VB 6 dll it's calling, //so maybe I'll give him a pass on this one. On the other hand, he also wrote the original VB6 so.... anyway. myadorecordset.MoveLast(); myadorecordset.MoveFirst(); for (; !myadorecordset.EOF; myadorecordset.MoveNext()) { //I don't even... Amazingly, this is technically a valid for loop construct, but holy hell where did //he come up with this? A while loop would make a lot more sense. XML += "<Items>" XML += myadorecorset.Fiels[0].ToSTring() //a hundred more lines of string concatenation to continue building XML snipped. } } }
-
RE: Yahoo's Engineers Move to Coding Without a Net
Well, Yahoo was irrelevant before. This is part of them trying different things to regain relevance (and cut costs, I'm sure).
Users really are the best QAers. On the other hand, most users don't want to be treated as QA.
-
RE: Go gets Belgium'd
By the way, I'm actually closer to pro-choice than pro-life, though I think there are significant problems with both positions. But that probably doesn't fit your Narrative, so feel free to ignore it.
Good for you? I'm kind of the same way, but I'm closer to pro-life than pro-choice. Oops! Somehow you assumed the opposite of me.
The main difference is, I'm conscious of my assumptions based on language, you apparently think you don't make any, and admitting to it makes you a bigot. Also, you don't like social justice, which is just... wow, seriously... I can't even think of the kind of person who seriously thinks that way. It's like, most people who are racist don't think they are (my Dad went to his grave saying he wasn't racist, it's just that the NAACP is ten times worse than the KKK ever was). But then there's that one guy who openly admits to it, and you're just dumbfounded. I can't even imagine the person who would seriously think social justice is bad.
-
RE: Go gets Belgium'd
Do you not think it's possible to object to the thought policing and the end-justifies-the-means attitude without having a particular stand on women's issues?
While I completely disagree with your perceptions of it, I understand what you mean. And, yes, sure I do. There are certainly people that you would call a "SJW" that I would be on your side in disagreeing with, and disliking the tactics of.
That being said, in practice it never works out that way. It's like, recently there was a study, and it turns out that people who use the #GamerGate hashtag on Twitter were as likely to be pro-life as #ShoutYourAbortion users were to be pro-choice. So, while I can see that in theory a "Gamegater" might really just be concerned about games journalism ethics, in practice you can assume a lot more about them.
Similarly, anyone who would use the phrase "Social Justice Warrior" as a perjoritive... I mean, social justice is good! You might want to think about the image you're projecting. So while I might even sometimes agree with you about a specific person who is a "SJW" in your view, by using that term you're going to make someone like me assume a lot of other things about you that I almost always see getting spouted by people who call others "SJWs."
-
RE: Go gets Belgium'd
You've been spending too much time browsing r/theredpill. Most of us don't think that. You might try asking us what we think (there are enough of us here who use SJW as an insult) instead of blindly following the Narrative.
Eh, I'm not a huge redditor. Never heard of that one before. But you can glean a lot from a person by the language they use. Like, if someone uses the word "cis" to describe a straight person, I have a good idea they're pretty deep into the LGBT community. I don't need to hear their long in depth explanation of why we should use that term instead of "straight," or they're not exactly the same or whatever. Similarly, when people start saying "SJW" or "MRA," I have a pretty good idea where they stand on women's issues. I don't need to hear the long version I've heard a million times before. I mean, feel free to contradict me if I want. But I doubt you will.
Which no-one was seriously doing.
Did I say they were? Nope, I didn't.
But identical resumes for STEM jobs are viewed as weaker if they have a woman's name on them than a man's. Now, I don't think all of these scientists are all like "LOL, women can't science!" but we all absorb a lot of stereotypes subconciously. Both men and women consistently underestimate women's intelligence. Why is that happening? We've got too options: on some gentic programed level, we're just wired to think that women are less intelligent than they are. Or, it's possible it's something we absorb from society.
Of those two, I think the latter is far more likely. Mostly becuase, historically, every time people have said "that's just innate to the sexes," it turns out they're wrong. I mean, not every time. But most of the time. And if we're absorbing it from society, where's it coming from? It's not hard to figure out. It's all the little things. No one tells a girl "you can't be a programmer." They just hear dumb girl/mom/grandma jokes. They see TV Shows where the girls are princesses and ballerinas and the boys are leaders and adventurers (with a booksmart-yet-streetdumb sidekick, who is also a boy 90% of the time).
You may be doing it in jest, and not "seriously," but that doesn't mean it doesn't have an impact.
-
RE: Go gets Belgium'd
Yeah. Men are never on the receiving end of this, are they?
It's not a zero sum game. When someone says something about racism, do you respond "What, like white people never get the short end of the stick?"
Bad stereotypes are impressed on boys too, but the issue was specifically about marginalizing women.
-
RE: Go gets Belgium'd
I agree with the "grandma," thing, actually.
We have an issue with women in tech. Very few women end up thinking engineering (of any kind) is right for them. Now, I know the kind of people that think "Social Justice Warrior" is an insult will claim that women's brains are somehow fundamentally different and they just don't have all the right synapses to be analytical, but the fact is that women's participation in computer science used to be much higher - it took a huge nose dive in the '80s, at the same time pop culture started portraying it as a male thing.
People like to think our personal interests some kind of innate thing, not at all influenced my media and larger society, but sorry! The human brain doesn't work that way. No one is going out and telling girls that they shouldn't be scientists, and they should be ballerinas. But every "dumb blonde" joke, every adult who praises their looks instead of their smarts, and every kids show where the bookworm is a boy and the ditz is a girl (ie, most of them), is another brick in the wall.
So leave your grandma alone.
-
RE: Blakeyxkcd and the years and years of struggling with broken software that just so happens to use git
It also requires banning WIP commits. That is enforcing a policy; something to look into git-flow for it. Even then it needs proper code review process to make bisect possible.
A ton of my commits are "WIP on Subfeature" types that I end up squashing together.
-
RE: When you should use Go
ell, performance isn't the only metric. It also has to be maintainable, and if they can find more Go programmers, then Go may be the best fit for them.
Hahahahaha
-
RE: Blakeyxkcd and the years and years of struggling with broken software that just so happens to use git
As someone who's heavily invested in the .NET world, I've got some opinions here. I've used bot TFVC (Team Foundation Version Control) and SVN quite a bit. Recently, a couple of us at my current job got to do a bit of website greenfield development, and we had to create a new repo. We decided to give Git a try for a couple reasons. Mostly, just because it's so dang popular. I'd only ever used Github for Windows before, which I found it be a universally bad experience, but it seems everyone is moving to Git these days - TFS even now supports it now, so we decided to give it a try.
Even though Visual Studio has perfectly good Git support now, I decided to "go native" and live on the command line. Six months later, and I've drank the Git Kool Aid. If I have my way, I'll never go back to TFVC or SVN. Git - once you understand it - really is very powerful. I especially love the rebasing. I really love the ability to rebase my commits and squash/rewrite things so that my history looks nice and easily readable before I do any merges. By the way, I can't recommend Posh Git enough if you love the CLI on Windows.
-
RE: State of the OS: Windows 10 Edition
It's fine, and you can Ctrl-C and Ctrl-V on the command line, which is enough for me to recommend it to every developer.
-
RE: Something dumber than Retro VGS
Well, in theory the cartridge could contain an iOS and Android version, so you could buy a game once and use it on your Nexus phone and iPad both... not that it's enough of an upside. Just trying to think of some kind of advantage.