Live data from Hacker News

What happens when you search 'ugly hack' in GitHub

github.com

61–69 of 69 posts

Re: What happens when you search 'ugly hack' in GitHub

#61

Search for "temporary fix" https://github.com/search?q=temporary+fix&type=Code&ref=sear... . 3 million plus and counting :)

That also matches with just "fix" or "temporary". This one works better: https://github.com/search?q=%22temporary+fix%22&type=Code&re...

Now to figure out how old these are.

Re: What happens when you search 'ugly hack' in GitHub

#63
post #7

Earlier quoted context omitted.

> I'd be curious to see if there's a relationship between 'ugly hack' in code commits and the languages being used Perl is not in their list. Either everything we do is an ugly hack, or everything we do is simple and elegant. :)

Or... nobody writes in Perl anymore... or... every Perl developer is a seasoned Perl developer.

Welp, neither of those are true.

Re: What happens when you search 'ugly hack' in GitHub

#64
post #17

I love the term 'ugly hack'. It's a very short way of saying 'a solution for a problem that assumes too much of the current context in which this component is called, and is guaranteed to break when the context changes'. It also implies 'this is intended to be temporary because I don't feel like doing the proper solution at this moment' which is accompanied with the intent 'we should fix this later' although most peo…

When I write it it usually means I know it sucks, but I'm reasonably happy with it - but if someone catches me out on it it's ok because I already criticised it myself

Excellently put. It's like lampshading[1], for code.

[1]: http://tvtropes.org/pmwiki/pmwiki.php/Main/LampshadeHanging

Re: What happens when you search 'ugly hack' in GitHub

#65
post #47
post #37

Some results normalized by overall language popularity. Specifically, the entry in row R and column C is 1000 * (hits for C in language R) / (hits for "the" in language R) or "---" if either the numerator or denominator was small enough not to make the top-10 list on github. All the scraping was done by hand and the numbers rounded to a limited number of places in the process, so there may very well be mistakes. [EDI…

I read your table and immediately jumped to a different conclusion: That python programmers are more sensitive to ugly hacks and more likely to call them out. Not saying I'm right, but I don't know that the data can distinguish the hypotheses.

Not picking a language fight.

My intuition tells me that if your alternative hypothesis were true, then php programmers have higher standards because they ajudge more code 'ugly and C++ programmers are universally perfectionists...or at least when they are not confused which it appears they usually are.

Just for fun with hypothesizing, does Python's near 50/50 split between 'ugly and 'beautiful suggest a large degree of random use? Or more interestingly, does it suggest there is a tendency to classify middle cases as extreme cases, and is this a result of the community having 'a Pythonic Way?'

Re: What happens when you search 'ugly hack' in GitHub

#66
post #17

I love the term 'ugly hack'. It's a very short way of saying 'a solution for a problem that assumes too much of the current context in which this component is called, and is guaranteed to break when the context changes'. It also implies 'this is intended to be temporary because I don't feel like doing the proper solution at this moment' which is accompanied with the intent 'we should fix this later' although most peo…

'Ugly hack' is an ugly hack of 'kludge'.

Re: What happens when you search 'ugly hack' in GitHub

#67
post #17

I love the term 'ugly hack'. It's a very short way of saying 'a solution for a problem that assumes too much of the current context in which this component is called, and is guaranteed to break when the context changes'. It also implies 'this is intended to be temporary because I don't feel like doing the proper solution at this moment' which is accompanied with the intent 'we should fix this later' although most peo…

Sometimes, instead of "I don't feel like doing the proper solution," it's "I haven't yet figured out the proper solution," or "A cleaner solution means adding 250 lines of code to address problems we may not have."

Re: What happens when you search 'ugly hack' in GitHub

#69
post #55
post #37

Some results normalized by overall language popularity. Specifically, the entry in row R and column C is 1000 * (hits for C in language R) / (hits for "the" in language R) or "---" if either the numerator or denominator was small enough not to make the top-10 list on github. All the scraping was done by hand and the numbers rounded to a limited number of places in the process, so there may very well be mistakes. [EDI…

There is a namespace in C++ called WTF, which probably accounts for a skew in that column.

There is a library in C++ called Web Transaction Framework(WTF): https://github.com/belzano/WTF
Post reply on HN