News for hackers. Stuff that matters.
Re:What happens when you search 'ugly hack' in GitHub by hugofirth on Thursday July 17, 2014 @06:14AM (#8046713)
Haha:

https://www.dropbox.com/s/j7rwshax2e9zwln/Screenshot%202014-...

Not even PHP can come within a factor of 5 of C when it comes to ugly hacks.

EDIT: And its not exactly like there is a bias at work: http://goo.gl/ZezFiP

Re:What happens when you search 'ugly hack' in GitHub by torrent-of-ions on Thursday July 17, 2014 @06:19AM (#8046726)
But is it because C programmers make more ugly hacks or that C programmers are more likely to know when they are making an ugly hack?
Re:What happens when you search 'ugly hack' in GitHub by krapp on Thursday July 17, 2014 @08:38AM (#8047126)
I think PHP is more or less just for the web, giving C programmers more ugly hack surface overall.

Also PHP itself is an ugly hack of C anyway.

Re:What happens when you search 'ugly hack' in GitHub by spyder on Thursday July 17, 2014 @06:53AM (#8046820)
There is a bias because there is more C code. The number of repositories doesn't equal to the quantity of code and if you search for general things that are used in both languages frequently then there is always more C results, for example:

https://github.com/search?p=1&q=if+&ref=searchresults&type=C...

https://github.com/search?p=1&q=return+&ref=searchresults&ty...

Re:What happens when you search 'ugly hack' in GitHub by hugofirth on Thursday July 17, 2014 @07:16AM (#8046868)
Fair enough. If there is a bias towards C I would guess it was more due to the situations in which C gets used, than C itself. Talking to a friend who has to try and get the same C/C++ codebase to compile for 6 different platforms (consoles) has been an eye opening experience. That kind of environment is like a slightly warm petri dish for ugly hacks.