The Official Status Thread
-
But I like the train station idea - it reminds me of Paddington.
That was the reference. I've actually taken to calling the dragon Newcastle Central.
-
I used one goto in a piece of low-level C code and got chewed out for it. Had to rewrite it without goto and it was like triple the number of lines.
You couldn't use a function and an early return? Or do they outlaw those too in that place?
There's more WTF about your guidelines than just 'no goto' if it's a goto or three times the linecount...
-
send them this:
as in all the SE areas, going full crusade against something often is Doing It Wrong
From: Linus Torvalds
Subject: Re: any chance of 2.6.0-test*?
Date: Sun, 12 Jan 2003 12:22:26 -0800 (PST)On Sun, 12 Jan 2003, Rob Wilkens wrote:
However, I have always been taught, and have always believed that
"goto"s are inherently evil. They are the creators of spaghetti codeNo, you've been brainwashed by CS people who thought that Niklaus Wirth
actually knew what he was talking about. He didn't. He doesn't have a
frigging clue.(you start reading through the code to understand it (months or years
after its written), and suddenly you jump to somewhere totally
unrelated, and then jump somewhere else backwards, and it all gets ugly
quickly). This makes later debugging of code total hell.Any if-statement is a goto. As are all structured loops.
Ans sometimes structure is good. When it's good, you should use it.
And sometimes structure is bad, and gets into the way, and using a
"goto" is just much clearer.
-
Status: thinking I might be in a valid use case for
goto
, since the alternative looks like becoming a large tree of nestedif...else if...else
calls.I used a
goto
yesterday FWIW. I may revisit the code later and see if it's truly the best that it can be, or if I can restate it without needing agoto
...
-
-
I used one goto in a piece of low-level C code and got chewed out for it. Had to rewrite it without goto and it was like triple the number of lines.
That kind of shit pisses me of. OK sure,
goto
s aren't necessary like 95% of the time, but in those other 5% cases, just use the damn tools you have.Mindless adherence to dogma is the root of all evil.
-
x1 is the country with the code ISO-3166 “BE” (Belgium) for people x2.
-
You couldn't use a function and an early return? Or do they outlaw those too in that place?
There's more WTF about your guidelines than just 'no goto' if it's a goto or three times the linecount...
It's been a while, but it had something to do with registry reads using plain C and the Win32 API all while being compatible from Windows XP and up with minor changes in registry format. All the string lookups and string concatenation was a chore, and somehow the goto chopped out around 50 lines of code.
-
No.
-
Status: Trying to catch up and read the green post saga eventually (yes, I missed that one).
-
Status: FoxNews comments are amazing.
Perfectly normal article about the Germanwings crash:
Top comment:
Reports are surfacing now that he yelled: "Obama Akbar!" right before the plane hit the mountain.
-
Status: Trying to catch up and read the green post saga eventually (yes, I missed that one).
Summary: @PJH turned Blakey's post text green as a joke. Several of us thought it was funny, but Blakey took it really badly, and the joke backfired as a result. Then it all got a bit silly. @PJH did reverse the change before it got too out of hand though.
-
Was that "no" as in "I don't want to" or "no" as in "I tried, but it errors because they're injecting the censored words directly into the SQL statement without escaping it"?
-
Not possible to switch?
I doubt it. Testing a bunch of conditions, some with database calls, some just "is it well formed?". Some failures need to mark the check as a failure and carry on in case there are any others to report, some need to exit there and then (eg item not in the database, so no point seeing if the item has the right properties)
I think a lot of it can be removed with early returns instead
-
Status: No Ticket
I honestly didn't think it would be quite that bad. When they go on sale again, I'm going to get my
~42 concierge services on it. Hopefully between the five of us I can get at least one ticket. :D
-
Was that "no" as in "I don't want to" or "no" as in "I tried, but it errors because they're injecting the censored words directly into the SQL statement without escaping it"?
Yes.
-
You couldn't use a function and an early return? Or do they outlaw those too in that place?
I never understood this shit. Yes, a
goto
can be confusing. But damn it, how is breaking out of the loops and, optionally, doing something likereturn_val = false;
and then doingreturn return_val;
as the last statement less clear thanreturn false; // Fuck it, nothing I can do here
?
-
Not to forget,well-formulated guard clauses are a lot better than unnecessary if/else branches.
-
I quite often make a variable called
result
and have my function end withreturn result;
if it makes sense to do so (setresult
to the function's failure/default value, run a fewif
s and setresult
conditionally).But I don't have any objection earlying out of a function if it makes sense to do so either—instead of this:
if(a) { if(b) { if(c) { return blah; } } } return false;
This is arguably better style:
if(!a || !b || !c) { return false; } return blah;
Be pragmatic—think about what your code is trying to do, and write it as clearly as possible within that constraint.
-
I quite often make a variable called result and have my function end with return result; if it makes sense to do so (set result to the function's failure/default value, run a few ifs and set result conditionally).
Of course, this makes sense in many cases and you should use it if it does. What I was objecting to is religious following of "one exit point only!" idea. It's the same kind of pigheadedness as "never use
goto
!", really, but crops up much more often than a perfectly legitimate use ofgoto
.
-
-
Well, I could try to see about proper handling of this in my API as well, but I'm trying to break LMDE atm
Hmmm... I have that cloud9 account, and I got Qt to run there... is that thing accessible from outside world for initial testing at least?
-
Status: just saw this assignment from a university professor: "talk about real life uses of FPGAs, such as bitcoin mineralization"
:-|
-
mineralization
You continue to use the name. Which means that I don't think this is what he meant.
-
maybe he manages to mint bitcoins with the FPGAs
-
You continue to use the name. Which means that I don't think this is what he meant.
Status: Liking how a random vomiting from Translator has become a forum meme
-
Status: wondering if i should put @GLaDOs out of its potato and give her a decent sever....
also, new usercard background
-
-
I'm just actually about to give http://vps.me a test run to see whether their 'free' VPS is worth using for anything:
- 0.6GHz CPU
- 384MB RAM
- 5GB HD
- 10GB BW.
Not exactly a Mac Plus, but we'll see...
-
What in the...
@aliceif, was that some Discoreordering in action, or should I classify this as a bug? Well, I think I should anyway, the first notification (chronologically, so the bottom one) leads to a completely wrong post. Or is this a known bug and I shouldn't bother?
-
NFC.
I started at your initial post and clicked select+replies on everything socksite-related, once everything was selected, I clicked the "Jeff to new topic" button.
-
I only got one gnotification. But then I had the topic open when we got Jeffed.
-
First notification leads to:
Second one leads to:
They are doing the
topic_id/post_number
bullshit again, aren't they?I only got one gnotification. But then I had the topic open when we got Jeffed.
I did, too.
-
I got only one. Pointing to $random_post in this thread
-
Not exactly a Mac Plus, but we'll see...
Due to huge interest in VPS.ME free vps services, today we have reached free VPS quota, please try to order free vps later or choose another paid plan.
Bum.
-
What Os do you run? WINDOWs? MACINTOSh? LINUx?
-
Status:
TIL: Linux Mint Debian Edition repos suck!
There, that's three threads combined: status, TIL and my attempts to blow up Debian using PPAs. Saved you some
/latest
spam.
-
Status: Finally the weekend. Hopefully it is better than the week it ends.
-
OK, this vps.me company just sent me registration email with my password in it. In 2015.
Not going to do any business with them, then...
-
If you offer someone a free trial of your service, and you give them a frustrating and broken experience, do you think that person is going to want to become a paying customer?
-
Jeff posted that he will buy a book of his choice for anyone who makes the best CommonMark tutorial.
-
Jeff posted that he will buy a book of his choice for anyone who makes the best CommonMark tutorial.
Run!
Do I win?
-
bitcoin mineralization
A scratched bitcoin left in mineral-rich water for long enough would almost certainly become mineralized.
ETA: bitcoin, bitcoin miner, etc.
-
Status:
What in the...
Dare I ask why that number is there?
-
Status:
Requested a password reset on cloud9. This is what I got:
... ummm....
Filed under: Don't bother, I changed it, that's why I didn't bother censoring it
-
-
Reports are surfacing now that he yelled: "Obama Akbar!" right before the plane hit the mountain.
If I was gonna crash the plane, I would totally do that, just to mess with liberals.
-
-
Yes, I figured it out once I got some caffeine in me, and actually read bits of the thread (after I mustered up enough courage to open it).
-
I just opened it and hit End; my cybernetics will take care of the rest