Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
the littlest prince
Sep 23, 2006


SupSuper posted:

Did someone say use cases?

Somebody please upload that last one to imgur and post it here; it is too good to miss. I would do it but my work proxy keeps uploads from working.

Adbot
ADBOT LOVES YOU

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

the littlest prince posted:

Somebody please upload that last one to imgur and post it here; it is too good to miss. I would do it but my work proxy keeps uploads from working.



If the user gets all the way to View Travel Alerts, he turns into a king.

JawnV6
Jul 4, 2004

So hot ...
Thank god for the little bumps in the lines. Can't imagine how you'd trace them if they just went point to point.

1337JiveTurkey
Feb 17, 2005

Vasja posted:


Fear me, for I am Lord Use Case

Seriously though, what the hell. I think at a certain point you have to go 'these guys just look like they are firing lasers at each other, maybe this isn't a useful diagram any more.'

First thing that came to mind when seeing that.

Only registered members can see post attachments!

Ornedan
Nov 4, 2009


Cybernetic Crumb
What's up with the faint (mirrored?) diagrams in the background of those use case images?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Ornedan posted:

What's up with the faint (mirrored?) diagrams in the background of those use case images?

Scan of a double-sided printout.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

1337JiveTurkey posted:

First thing that came to mind when seeing that.



There's an iOS remake of FF6 now?

shodanjr_gr
Nov 20, 2007
From some C++ code I got from a guy at the lab today:

code:
// Destructors
~ClassDefinedAndImplementedInFourHundredLineHeaderFile();
// End of Destructors

shrughes
Oct 11, 2008

(call/cc call/cc)
He'll get the last laugh when C++23 allows passing parameters to destructors!

Drastic Actions
Apr 7, 2009

FUCK YOU!
GET PUMPED!
Nap Ghost
code:
if isNumeric(objConfig.getItem(30)) then bSumRequired = (objConfig.getItem(30) = 1) end if
		if isNumeric(objConfig.getItem(31)) then bStartStopReq = (objConfig.getItem(31) = 1) end if
		if isNumeric(objConfig.getItem(34)) then bShowServiceDesk = cbool(objConfig.getItem(34)) end if
		if isNumeric(objConfig.getItem(44)) then bAllowFlexTime = (objConfig.getItem(44) = 1) end if
		if isNumeric(objConfig.getItem(55)) then bProhibitTimeEntry = (objConfig.getItem(55) = 1) end if
		if isNumeric(objConfig.getItem(80)) then bReduceResouceBillableHoursGoal = (objConfig.getItem(80) = 1) end if
		if isNumeric(objConfig.getItem(33)) then iRoundingMins = (objConfig.getItem(33)) end if
		if isNumeric(objConfig.getItem(61)) then DontRoundWorked = (objConfig.getItem(61)) end if
		if len(DontRoundWorked) < 1 then DontRoundWorked = 0 end if
		if CStr(DontRoundWorked) = "1" then DontRoundWorked = "true" else DontRoundWorked = "false"
This is ASP code used on a timesheet page.
What's getItem(30)? No idea. But I do know that bSumRequired is actually checking if the "summary" is required for a time entry. Why shorten "Summary" to a word that already exists that has nothing to do with it?

:(

Polio Vax Scene
Apr 5, 2009



Obviously it's getting the 30th input field on the form. So uh...don't add/remove any before that.

raminasi
Jan 25, 2005

a last drink with no ice
"Remote to Local caster function. This stuff is complex, don't concern yourself with casting logic." is not acceptable documentation for a function :mad:

KaneTW
Dec 2, 2011

GrumpyDoctor posted:

"Remote to Local caster function. This stuff is complex, don't concern yourself with casting logic." is not acceptable documentation for a function :mad:

You're developing teleportation spells?!

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

KaneTW posted:

You're developing teleportation spells?!

Arcanum sequel confirmed

Opinion Haver
Apr 9, 2007

We've all seen PHP advocates defend PHP before. But have you seen them in the comments section of MLP fanart?

nuvan
Mar 29, 2008

And the gentle call of the feral 3am "Everything is going so well you can't help but panic."

Opinion Haver posted:

We've all seen PHP advocates defend PHP before. But have you seen them in the comments section of MLP fanart?

Never before have I seen a link I was so scared to click.

kitten smoothie
Dec 29, 2001

Opinion Haver posted:

We've all seen PHP advocates defend PHP before. But have you seen them in the comments section of MLP fanart?

The other comments to that piece are good, too. Like the poster who talked about programming Cobalt and Pearl.

Flobbster
Feb 17, 2005

"Cadet Kirk, after the way you cheated on the Kobayashi Maru test I oughta punch you in tha face!"
Just moved to California and had to redo my auto insurance policy, and then print out a document to send to the DMV. So I logged on to their website and went to the online documents area. In Safari, the document downloaded as a 3-page PDF. No prob.

But since I needed to print it off at work, I logged on there where I primarily use Chrome. The document downloaded as... an HTML page with three <img> tags, one for each page, with poorly aliased text, encoded as a data: URI. :stare:

How does that even happen?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Flobbster posted:

Just moved to California and had to redo my auto insurance policy, and then print out a document to send to the DMV. So I logged on to their website and went to the online documents area. In Safari, the document downloaded as a 3-page PDF. No prob.

But since I needed to print it off at work, I logged on there where I primarily use Chrome. The document downloaded as... an HTML page with three <img> tags, one for each page, with poorly aliased text, encoded as a data: URI. :stare:

How does that even happen?

Not Safari, Firefox or MSIE? Must be netscape or something from beyond the sands of time, better go to compatibility mode. PDFs may not yet be invented.

pseudorandom name
May 6, 2007

Except the data URL protocol is new.

Jewel
May 2, 2009

pseudorandom name posted:

Except the data URL protocol is new.

http://tools.ietf.org/html/rfc2397

"Proposed August 1998"

:confused:

pseudorandom name
May 6, 2007

When was it actually implemented?

Strong Sauce
Jul 2, 2003

You know I am not really your father.





All browsers support it at the moment except IE, with partial support.

http://caniuse.com/#feat=datauri

NtotheTC
Dec 31, 2007


Opinion Haver posted:

We've all seen PHP advocates defend PHP before. But have you seen them in the comments section of MLP fanart?

:smug: "PHP is way more secure than Java or C"

:v: "Uh, I'm not sure that's true"

:smug: "Well unless you can provide me with hundreds of specific sources proving your point then your argument is indefensible"


Outstanding.

ixnay
Jun 11, 2002

rainbow dash why are you making such a cool face?!
A customer is using "strings.php" to define all of the product sections on their website, which is comprised of this amazing set of arrays:

PHP code:
//Do NOT touch this section
$tab = array();
$category = array(array());
$image = array(array());
$family = array(array());
$prodName = array(array(array()));
$pcode = array(array(array()));
$promoIMG = array();
$promoLink = array();
$promoAlt = array();

//Product Section
$selectText             = "Please select your product...";
$moreText               = "More products...";
$i=1;           //Do NOT change
$k=1;           //Do NOT change
$j=1;           //Do NOT change
$tab[$i]                                = "Our Company";
$more[$i]                               = 0;
$category[$i][$k]               = "Network Storage";
$image[$i][$k]                  = "/zzz/qqq/images/enduser/feature_zzz.jpg";
$family[$i][$k]                 = "1188";
$prodName[$i][$k][$j]   = "Our Company zzz-450r";
$pcode[$i][$k][$j]              = "1195";
$j++;           //Do NOT change
$prodName[$i][$k][$j]   = "Our Company zzz-400r";
$pcode[$i][$k][$j]              = "1196";
$j++;           //Do NOT change
$prodName[$i][$k][$j]   = "Our Company zzz-300r";
$pcode[$i][$k][$j]              = "1198";
$k++;           //Do NOT change
$j=1;           //Do NOT change
$category[$i][$k]               = "Desktop Network Storage";
$image[$i][$k]                  = "/zzz/qqq/images/enduser/feature_zzz_desktop.jpg";
$family[$i][$k]                 = "1189";
$prodName[$i][$k][$j]   = "Our Company zzz-300d";
$pcode[$i][$k][$j]              = "1190";
$j++;           //Do NOT change
$prodName[$i][$k][$j]   = "Our Company xxx-300d";
$pcode[$i][$k][$j]              = "1191";
$j++;           //Do NOT change
$prodName[$i][$k][$j]   = "Our Company yyy-300d";
$pcode[$i][$k][$j]              = "1192";
$k++;           //Do NOT change
$j=1;           //Do NOT change
This repeats for a couple hundred lines.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
What I love most is the "Do NOT change" comments. I suspect that it was laid out this way because someone was getting sick of having to make code changes for the business side making minor text changes, so he decided to make this file to let them do it instead. Except that the business folks decided that they didn't need those i's or j's and just chucked them.

EAT THE EGGS RICOLA
May 29, 2008

Someone blew up all the Jenkins plugins repositories because they had forced push permissions without realizing it.

quote:

AW - *PLEASE READ* Re: strange pushes on GitHub

Hi all,
I have triggered an involuntary "forced push" last night on the list of Jenkins-CI plugins indicated below in this e-mail.

My apology

I did not realise that I actually had forced push permissions and I do apologise for the inconvenience caused.
The operations pushed back the all the branches to around 1 month. The history is not lost and is still on the GitHub server but on detached branches.

The solution

I can raise a request to GitHub to provide the "reflog" of those repositories and restore the branches to the point before my forced push.
Alternatively the owners of those repositories can still perform a "forced push" to restore the correct position of the branches.
(if you would like to do so, please write to the mailing list so that we do not overlap the recovery operations)

The full list

See below the full list of repositories impacted:

[snip]

The prevention

Can we prevent this to happen again ?
I personally do not work on any of those repositories but still have "forced push" permissions ... and so many other people have.
I don't see the value of having such power of "potential disruption" associated to my account :-( ... can we remove the forced push by default and enable on a case-by-case basis ?

--- * ---

If you would like to propose an alternative approach to resolve the problem, feel free to follow-up !

... and again ... accept my sincere apologies :-(

Luca.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Holy gently caress. Not updating any plugins this week.

Pythagoras a trois
Feb 19, 2004

I have a lot of points to make and I will make them later.

quote:

Can we prevent this to happen again ?
I do not work on any of these projects, why do you let me force push to them? Shame on you. If you control user permissions please write to the mailing list to revoke force push on my account after recovery efforts have been completed.

Strong Sauce
Jul 2, 2003

You know I am not really your father.





Git is pretty hard, but one of the stupid things is for you to just do a 'git push --force' without specifying the remote location/repo. It is annoying to me that he is blaming GitHub and others for giving him access when he was doing something as dangerous as that. Why would you even do that? If you want to overwrite history in one of your repos, you should be doing a git push specifically to that repo.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Strong Sauce posted:

Git is pretty hard, but one of the stupid things is for you to just do a 'git push --force' without specifying the remote location/repo. It is annoying to me that he is blaming GitHub and others for giving him access when he was doing something as dangerous as that. Why would you even do that? If you want to overwrite history in one of your repos, you should be doing a git push specifically to that repo.

I think if the default for a "dangerous" command like that is to just assume the user wants to overwrite history of every single repo they have access to, it's perfectly fair to blame git for having a horrible interface.

Additionally, it's also perfectly fair to say "hey maybe giving people who don't even work on this project the ability to horribly mess up your repository is a bad idea".

OddObserver
Apr 3, 2009
Didn't git recently change to have push only affect one branch by default?

necrotic
Aug 2, 2005
I owe my brother big time for this!

OddObserver posted:

Didn't git recently change to have push only affect one branch by default?

Yup. http://blog.nicoschuele.com/?p=217

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Jabor posted:

I think if the default for a "dangerous" command like that is to just assume the user wants to overwrite history of every single repo they have access to, it's perfectly fair to blame git for having a horrible interface.
Fortunately not only is that not the default, but it's not even a thing git can do at all (you can push a single repository to multiple remotes at once, but you can't operate on multiple repositories in a single git command). He did the equivalent of writing a script to loop over every file on his hard drive and call rm on each one under the assumption that it'd fail to delete most of the files.

Pollyanna
Mar 5, 2005

Milk's on them.


I like to imagine that this is the same Luca as the one on Masterchef.

Qwertycoatl
Dec 31, 2008

Why does this guy have permission to push to 180 repositories he's not involved with, anyway?

Strong Sauce
Jul 2, 2003

You know I am not really your father.





Jabor posted:

I think if the default for a "dangerous" command like that is to just assume the user wants to overwrite history of every single repo they have access to, it's perfectly fair to blame git for having a horrible interface.

Additionally, it's also perfectly fair to say "hey maybe giving people who don't even work on this project the ability to horribly mess up your repository is a bad idea".

`git push --force` is never a good idea. It is only dangerous if you add the --force flag, in which case you should be well aware of the dangers of using that flag. If he wanted to be on the safe side he should have just done a git merge/git push of his changes. You should never run that git command unless you're absolutely sure that is what you want to do.

I am really curious of the following though:

1. He did a `git push --force` with repos that were months old. That is pretty irresponsible. Why would you even do a `git push --force` without updating all your repos? I assume in this case he just wanted to force push to one repo, but then why would you not specify the repo in your command as a preventative measure, especially when you are using the --force flag?

2. He has been on Github for almost 4 years and just _assumed_ Github has something to prevent force pushes? According to someone in that thread it may be in the Enterprise edition? Regardless it seems like later on in the thread he admits that the way they use GitHub probably isn't normal so, again I don't know why he just assumed GitHub would protect him from this. Which again begs the question of why he didn't specify a repo instead of doing this.

This guy has over 20 years of experience and has been on GitHub ~4 years and he used git push --force? I mean I agree that the people who just added him to all the repos are partially to blame as well and I am sure (maybe) that they will now actually restrict access to repos but he still did something stupid.

I mean people make mistakes but it seems like he is trying to deflect a lot of the blame for something that should never happen. Maybe your fingers accidentally hit the Enter key when you were rewriting the command while changing repos or something. Just fess up to that instead of doing this.

Edit: They have 562 members in the organization and apparently 1K+ repos. Uhm, yeah maybe the admins of the org should have done a better job with access controls.

Strong Sauce fucked around with this message at 09:55 on Nov 12, 2013

Vanadium
Jan 8, 2005

Strong Sauce posted:

`git push --force` is never a good idea.

On github we keep doing that thing where we send a pull request, someone reviews+comments on the commits and suggests changes, and then we amend our commits and push -f them to the pull-requested branch until the pull request gets accepted. I don't think that's that weird a workflow?

EssOEss
Oct 23, 2006
128-bit approved
For those of us not englightened in the ways of git, what exactly is a forced push?

Adbot
ADBOT LOVES YOU

Vanadium
Jan 8, 2005

It's basically a push that doesn't just add commits to the top of the pushed-to branch in the remote repository, but can arbitrarily rewrite the branch to point to a completely different commit.

In the case of this story, the push reset 150 repositories' branches to point to a month-old commit, basically just rewinding them and effectively dropping all the commits since. The commits were left floating around in git's object space and could easily be reached by their hash ids, it's just that they weren't reachable by looking at the commit at the top of the branch and its ancestors, so they wouldn't show up in that branch's history. It's fairly easy to fix but I guess it's a pain to do it 150 times.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply