« first day (837 days earlier)      last day (3478 days later) » 

21:00
0
A: Small generic path search framework in Java

Eric SteinUtils Statically importing these methods is questionable - it makes it harder to read code without consulting the list of imports. Triple Don't do this. Use a real class that contains the data you need. Maybe DirectedGraph would be a good name. choose() Should be named better - selectRandomN...

what are we talking about here?
> The compiler won't like this because it will be looking for another item in the array,
It likes it perfectly fine.
And it doesn't violate any standards that I'm aware of.
Violate all the standards!
@EBrown That was my answer to a question on SO.
@Morwenn Seems valid.
> You just have to remember that var[3] and 3[var] are equivalent.
Really?
Depends on the language, but yes.
in c++ they are
dirty C++ pointer magic
in java that's illegal
21:04
In C and C++, arr[3] is a shorthand for *(arr + 3) so it also works the other way around. It isn't true for an overloaded operator[] but it at least works with pointers and thus built-in strings and arrays.
it's illegal, period. C++ is in fact *C<<[1]++
but it's perfectly valid to declare public static void main(final String args [])
Nifty.
It would probably have been illegal C++ too if they didn't try to be backward-compatible with C.
Therefore n["abcdefghijklmnopqrstuvwxyz"] will give you the nth letter in the alphabet.
that's pretty cool actually
Eh, that means that before coming to Code Review, I actually mastered "how to write bad code".
5
@Morwenn Don't feel too bad.
We have a contractor in work right now with 17 years of experience in C# who didn't know how switch worked... or how to use regular expressions to extract things within quotation marks from within XML. Or how to use XML parsing libraries to do it either.
But did he know pattern matching?
Today I taught him how to use a regular expression to extract something from the equotation marks from something like this:
<Node Content="FooBar"></Node>
Now, granted, you wouldn't usually use Regex for parsing HTML, but he only wanted that specific attribute so it was the simplest solution.
Compared to what he was trying to do, which was use string.indexOf to get the first quotation mark, and then find the next one and substring it.
The only problem is he couldn't work out how to get the next quotation mark because it was all one big contiguous string
21:15
17 years of experience and is a contractor
I'm voting to close this question as off-topic because this belongs on Code Review, rather than being a specific question about software development. — Jeff Bowman 11 secs ago
He also asked our tech lead if his name was common in China
0
Q: Caesar Cipher Encryptor in Ruby using ASCII

scoboAs the title says, I have built a Caesar Cipher in Ruby that utilizes ASCII for the encryption. I am not sure whether or not this was the best way to go about the task but this way made the most sense to me. My code is below. Please give me any feedback that comes to mind. Thanks puts 'Please en...

...our tech lead is vietnamese
How did he even mistook one for the other? The two languages have like nothing in common.
21:17
Well our lead wasn't speaking vietnamese or chinese at the time
He just went off of how he looked
Which.. is arguably worse
2
You either admit you don't know shit or simply totally ignore one's origins, but never go for random guesses.
It was lucky our lead took it as a joke
that sort of thing is grounds for dismissal in the UK
@DanPantry No, you don't parse HTML with regex.
@Mast I said that :-)
Except he wasn't trying to parse HTML, he was just trying to extract a string from an XML doc
It was either crank out the XDocument API or use something like grep to do it
Since you have working code, this question is not appropriate for SO, but is for Code Review. There you will get both an analysis of your existing code and suggestions for improving it. — Cary Swoveland 27 secs ago
21:21
in this instance regex would have resulted in less lines of code... and given the contractor hadn't used that API straight away, it would mean that he would have had to learn that as well
@Duga What he will get is up to us, not to some random SO use who thinks he knows what we should and shouldn't.
@Mast shhhh.
I've never understood the obsession with lines of code. Readability over code length...
don't tell them we just decide at random what to tell them and what to laugh about here :)
5
@Mast That.
@Vogel612 Someone should tell him.
21:29
No, I think your code doesn't work correct. If cell at (0,0) is 0 your code will create a matrix - step by step- that ends in a matrix with all cells are 0. Right? So this isn't a question of codereview or refactoring. It's a question of, why does the algorithm not work correct. ;-) — dev.null 11 secs ago
Just when you think you wrote some kind of decent code, Janos comes by and shows you a way better way of doing things.
5
I'm off to bed. I will leave you with the happiest lizard in the world.
21:49
Greetings
@Mast To beginners, saying 'I've written 100 lines' (by adding empty ones) is better than saying 'I've written 50 lines'
Maybe not just beginners
@Mast Spaces everywhere. Many lines. Much great code. Wow.
I hate doge
-1
A: MySQL JOIN to JSON array

RiggsFollyThis is not vastly different but you might think its a little easier to read and follow and probably therefore debug. // get all the posts and their photos $st = $db->prepare ('SELECT * FROM `posts` ' . 'LEFT JOIN `photos` ON `photo_post` = `post_id`'); $st->execute (); // i...

You have presented an alternative solution, but haven't reviewed the code. Please explain your reasoning (how your solution works and how it improves upon the original) so that the author can learn from your thought process. — Quill 2 mins ago
I did, i.e. easier to read, follow, debug — RiggsFolly 1 min ago
That is an observation of your rewritten code, not a review of the author's existing code. — Quill 1 min ago
@IsmaelMiguel Doge hates you too, you meanie ><
21:56
I'm voting to close this question as off-topic because it belongs on Code Review. — the Tin Man just now
@Quill No, it's not. It's a terrible practice.
"I ATE YOUR DOGE, TASTE WAS GOOD"
@Mast What's not? Exaggerating the amount of work you did?
@Quill Measuring productivity/progress in Lines of Code.
@Mast Oh, it's a terrible practice
I'm most certainly condemning it
22:01
TTGTB
Is it a good enough point to allow the OP to make the decision on downvoting this answer? — RiggsFolly 4 mins ago
A) I don't give the author permission to downvote B) I downvoted it, lol, I obviously had a problem with it
@Quill Ok I think I am getting the hang of this site now. Thanks for the gentle push in the right direction — RiggsFolly 2 mins ago
22:17
in other news: rumors say that SO's gonna reach 10 million questions today
That so?
Shall I go ask one, or flag one, or something?
BTW, that GIF is driving me nuts.
They need 750 more.
Can easily be done in 24h.
Last chance to make a prediction:
53
Q: Let's predict the date of the ten millionth question on Stack Overflow

ericosg You know, if someone were to post "Predict the date of the 10th million question on SO" and ping me with a link, I'd endorse it with an offer of a swag box to the person that came the closest :) So, when will it happen? Rules: The question must last (not be deleted) during the entire day t...

But I think I was heading for bed...
/wave
> | 2015-08-19 | Dom |
> | 2015-08-20 | Jeremy Banks♦ |
We have 7 more hours (my time) for Dom to win. Otherwise, it is Jeremy Banks.
UTC, Jeremy Banks will win I think - just 1:30 more hours.
Optimizing working code is off topic on here. This site is for fixing broken code. You can try codereview.stackexchange for optimizing code. — deathismyfriend 1 min ago
codereview.stackexchange.com seems to be a better place for this. — Eser 51 secs ago
22:36
0
Q: Two sum algorithm variant - Optimization

PushCodeI need to compute the number of target values t in the interval [-10000,10000] (inclusive) such that there are distinct numbers x,y in the input file that satisfy x+y=t. I have the code which does work and would like to optimize it to run it faster. public static int Calculate(int start, int fin...

I'm voting to close this question as off-topic because this is advised to post in codereview.stackexchange.com — PushCode just now
lol (And don't disemvowel)
6
lol
2
23:01
@IsmaelMiguel, you can use --- instead of <hr> to format line breaks
@Quill I know
I'm used to <hr>
monking
Greetings
hello
Why does tag: exist?
because people that code C# are smarter than people that code VB
we already know whether we are coding for the .NET framework or not
23:07
Lol
4
what do you think @RubberDuck? you code in both languages don't you?
> Did I just miss a ?
almost
lol
4
lol
4
23:09
lol
Yes @Malachi often in the same solution, which leads to lots of VB#
What do I think about what though?
lol
4
@Mat'sMug After looking into that thing more, apparently that GUID is added into that field in the order record by design, and there is a job that runs overnight that assigns actual proper IDs then, and at that point the customer interface picks it up and can send it back to the supplier to be fulfilled (or something much like that). The guy I talked to did mention EDI so you were right on that account.
Also, this seems pointless
		DECLARE @mappedId varchar(50)
		SELECT @mappedId = Convert(varchar(50), NewId())
17 mins ago, by Malachi
because people that code C# are smarter than people that code VB
23:32
I don't think we're smarter. I just think VB people haven't seen the light yet. They can't see sharp yet.
6
@RubberDuck you know why Java programmers need glasses?
because they don't C#
I can't see the review of my suggested tag edit, is that normal?
On the tag page, the hyperlink bringing me there is blocked
On a normal post edit:
I think it is a bug
23:43
0
Q: Unable to view tag edit review

QuillWhen submitting a question / answer edit (below reputation requirement for instant), you get a response box like this: However, when you edit a tag, you get: Notice the lack of the hyperlink, bringing you to the review. Both tag edits and post edits hit the Suggested Edits queue, so then w...

You forgot to mention that the edit is visible on the all actions' tab
except I can't see that on sites where my rep is too low anyway
oh, I can see my edits
but the page should still provide me with a hyperlink
... That's what I said...
You can see the edit on your profile page, on the "all actions" tab
23:52
@IsmaelMiguel yeah, I didn't think you could (I was wrong), anyway:
2 mins ago, by Quill
but the page should still provide me with a hyperlink
I know, and that's why I upvoted the question
ty
You're welcome
It's a small bug that needs to be sorted
I just wish they would fix the bug on IE
It feels so slow around here lately, maybe I'm just missing the action while I'm asleep
@IsmaelMiguel Too late.
If it is fixed, it will be in Edge.
(I don't like Edge, I like IceDragon, with IE second.)
But then, I'm not a web developer.
23:56
@Hosch250 The bug affects IE9-11 but not IE8 and probably it will afect Edge as well.
@Quill It has been quite energetic here
In the wrong way
What bug?
When you edit a comment, THE WHOLE ENTIRE FUCKING PAGE WON'T DO ANY FUCKING THING
Sorry the wording
But I can't stress those words enough
The page craps out
Oh, that. Just CTRL-F5.
Doesn't scroll
That's a refresh...
Yeah, I've experience that - and not just on IE.
23:58
F5 works too
Well
You may want to update on the meta
@IsmaelMiguel there's usually a stream of duga, interesting new posts, and discussion on how C# is better than Java post related site business
I won't, because I'm only 98% sure on that last statement.
I might be remembering wrong.
I do know that it only happens when you edit twice in a row, though.
13
Q: Bug: Stack Overflow not clickable anymore when saving comment edit with enter

MouserOccurs on IE11 EDGE mode win8.1 (My pc). User Ismael Miguel notified me that this problem also happens on versions IE9 to 11 from Vista to 8.1, but not on IE8. Still occurs on IE Edge WIN 10 PRO. Time to take a look at it. The problem: When you edit your comment and save it using enter it keep...


« first day (837 days earlier)      last day (3478 days later) »