6 ms·
Git Punish – The Missing Git Command
- iigres 11y ago> git clone git@github.com:yavorskiy/comment-parser.git > cd comment-parser/ > git punish -L1,24 index.js http://git-punish.io/3EWZW http://git-punish.io/3EWZW code and committers you see on the page are parsed out from `git blame`
- tedivm 11y agoGo on, just sudo that unencrypted http link and blindly run what it downloads. I'm sure nothing bad could happen.
- irth 11y agoIf only the code of this website was available on git. We'd be able to punish him for that http link using his own tool.
- Ao7bei3s 11y agoWhat, just because he's suggesting to use curl to download a file? There's a difference between "curl ... | sh -" and this. He's even separated it nicely into steps, so you can view that (very short) file in between. What worries me more is that he doesn't properly quote $@, so this script will break when there are spaces in the filename. One of the reasons I hate bash.
- rsy96 11y agoNot because he is suggesting curl. But because he is suggesting curling without TLS.
- deleted 11y ago[deleted]
- organsnyder 11y agoYou are correct. It isn't a magic bullet. It is still significantly safer than unencrypted HTTP.
- Ao7bei3s 11y agoTLS wouldn't help; the greatest risk is the author himself sending a malicious script (no offense, Sergii). So everyone needs to check the script before running it anyway. Which is easy, because it's a very short script. (Of course, it's so short that it might as well have been an alias or, even better, just a copy-pasteable git command, but I guess the author really wanted to call it 'git punish'.)
- greggman 11y agoHow is this any different than any app/executable/script period? When you download VLC did you read all the code to check it's not installing a root kit? When you added some python lib do you go through all the code and make sure that on the 20th run it doesn't upload your private ssh keys? Have you checked all the vim or emacs code in your latest download before running it? Maybe I'm missing the issue but they all seem about the same level of bad. Am I missing something?
- Ao7bei3s 11y agoNo, what you're saying is exactly my point: there's nothing wrong here.
- RyanZAG 11y agoWow, one of these days someone needs to make a russian roulette binary that has a 1 in 20 chance to delete your home directory and post it to HN. Bonus points for including a link to the source without the russian roulette so that people can 'read the source for the binary' before running it. "Don't worry, you don't even need to 'sudo' this so it can't do any harm!" See, it's not running as root while it wipes clean your home folder.
- Ao7bei3s 11y agoAlready exists, but is completely unrelated. It's not curl thats the problem, it's combination of download and execution in the "curl | sh -" pattern, which is not used in the article.
- deleted 11y ago[deleted]
- biggestbob 11y agoWTF is this?
- conception 11y agoIt's git punish, the missing git command.
- LeoNatan25 11y agoNo. git was not created to make a hostile development environment.
- BillinghamJ 11y agoGiven its name, and its creator, I wouldn't necessarily make that assertion so absolutely...
- icelancer 11y agoOh yeah? Why is it git blame when it was svn praise?
- DonHopkins 11y agoWorking on the Linux kernel was already a hostile environment before Linus wrote git. But it's fair to say that he created git for a exiting hostile development environment.
- lol768 11y ago
- bjackman 11y agoWhat does it do?
- LeoNatan25 11y agoI hate such things. It creates a terrible work environment. Instead of focusing on the git blame and git punish, everyone should just focus on git commit fixes to make the code work. Does it really matter who put the bug? We are all humans, we all make mistakes.
- tmd83 11y agoWhile the name maybe a bit unfortunate or maybe made just for fun, git blame has actual use. While it's useful to see the commit log and figure out how the bug came to be, it can also be useful to talk with the respective developer if available and get an even better perspective.
- LeoNatan25 11y agoIndeed, but this is a different thing entirely. Getting a perspective to a problem and working together to fix it is one thing, going and pointing fingers, even in playful manner, is different. In the long run, it creates an unpleasant work environment. In our office, I always take the blame jokingly to lighten the mood. It's a running gag, we have three people who are more senior than the others, and we always say "it's his fault, and if not, it's the other one and if not, then it's Leo's fault" (I am the most senior). When a problem arises, it doesn't matter who inserted the bug, but how to fix it the quickest.
- icelancer 11y agoYou can just also use git annotate if you want to avoid the negativity.
- tmd83 11y agoYup, wasn't defending this one :). Did the git annotate came after blame cause in the olden time I remember seeing the git blame example. These days I mostly use IDEA's annotate feature and don't even know what's the command used in the backend.
- 11y ago
- arnarbi 11y agoAs always, kudos for taking an idea and executing it. But this is juvenile and harmful to your work environment. Please think twice before using it.
- devit 11y agoThis doesn't seem very effective at what it's trying to do. Once you create the page, what then? It should be a service that mails all other contributors in the commit log something like this: "Mr. <insert name> introduced a CATASTROPHIC security bug right here! Look at that! <insert code> <insert insults> Are all his contributions hidden landmines that might jeopardize the project at any time? Clearly they need to be checked! <insert list of all his other commits>" Maybe "git shame" would be more appropriate too. And yeah, you should probably not do that if it's a company project or a noncritical open source project.
- enqk 11y agoThis is symptomatic of something that has been bothering me lately. Programmers seem to be in some sort of twisted abusive relationship with their tools. Tools that other fellow programmers have written. Why do programmers hate other programmers so much? Why do they have so little empathy and care? Too much staying in one own's head? Lack of exposure to diverse opinions and emotions?
- wingerlang 11y ago> Programmers seem to be in some sort of twisted abusive relationship with their tools. What do you mean?
- enqk 11y agoThe tools provide some value and we depend on them, however they also abuse us by being very unfriendly and disrespectful of our time. I think this emerge of a certain way that programmers think of other programers. There are of course exceptions, but often tools made by other programmers don't seem to respect us as users and have bad user experience: - Few thoughts given to make common operations good, - Lots of clunky menus, - Poor performance, Basically going out of their ways to make us do something else than programming by killing the feedback loop. (Think libraries that are slow to compile, tools that run slowly or require assistance or are otherwise too granular) The absolute worst example I can give is something like Hudson or Jenkins.
- mikestew 11y ago> The absolute worst example I can give is something like Hudson or Jenkins. Though I agree with you to some extent, IMO you chose a bad example. Jenkins has one of the most shallow learning curve of any the tools I use, and doesn't require a lot of fussiness. If I can it to build from a terminal window, I can get it working on Jenkins in 30 minutes. Might I suggest Appium for your example? The one where, in the official docs, it says "If install fails, keep trying to install a few times." Rest assured that you'll need those instructions. Gawd, I hate Appium.
- bigethan 11y agoIf most of the comments here are about how this is pretty hostile and unfriendly, how is it on the front page? The Silent Brojority?
- dennisnedry 11y agoHacker News is full of bully lurkers? I personally despise those who ridicule instead of working with a dev who does not happen to grasp the error of his or her ways.
- Khao 11y agoBecause those who comment that it's bad simply missed the joke and are taking this seriously.
- Sir_Cmpwn 11y agoWow, guys. This is clearly a sarcastic tool. Banter between devs is common and healthy.
- fsloth 11y agoI do hope this is intended as a joke. As a tool this would be pointless and unhelpful. A graphic splash that does not explain why the code is bad and how it could be improved. Junior coders would be just shamed while seasoned professionals would be just irritated. Shame and irritation are usually unhelpful emotions.
- organsnyder 11y agoWhat may seem like banter to one person may be extremely hurtful to another. This is especially true for new devs, who are acutely vulnerable to Imposter Syndrome. Of course, banter between long-time colleagues is usually harmless. But it's often difficult knowing where to draw the line.
- Sir_Cmpwn 11y agoYou also have to praise and reward devs for their successes. It's not black and white - you don't have to pick between banter OR praise. You can have both. It's a dynamic. Show them that you care and that they're doing good work, genuinely. Tease them about small mistakes with tools like this, sarcastically and socially, and it helps build up rapport and make the team that much more tightly knit. Pointing out simple mistakes in a tongue in cheek manner is a good way to show someone that they've made a mistake, but it's not a big deal and no one is actually upset with them about it.
- organsnyder 11y agoIt's still difficult to know when the line has been crossed. What's perceived as harmless (even productive) banter by everyone else may still be hurtful to the recipient. You never know whether someone is okay with it, or simply hiding their emotions well. I do agree that a copious amount of praise goes a long way toward developing a healthy environment.
- _jomo 11y agoThe "background" image should have a z-index smaller than the text (and the text should have transparent background). Otherwise selecting text sometimes results in grabbing the image instead.
- macjohnmcc 11y agoIsn't using Git punishment enough?