« first day (936 days earlier)      last day (3087 days later) » 

4:00 PM
My Macbook was a few years old and only then died due to a liquid related incident.
 
Fun fun fun, I made an Userscript for OGame where it parses certain API keys, now the game got a small update such that the API keys can be directly copied, and my script no longer finds them ^^
 
@Phrancis My mom has a 2009 MacBook. She just installed a new drive and double the RAM because of speed issues.
 
@SuperBiasedMan liquid related incident
 
It really sped it up.
 
@SuperBiasedMan Coffee or something more, uh, sinister?
Its likely due to the SSD fragmentation (they do fragment, right?)
 
4:00 PM
@DanPantry Vitriol.
 
@Hosch250 Yup, had to add RAM from 2GB to 8GB a couple years ago, huge improvement
 
Someone tried to attack him, but his computer saved the day.
 
@DanPantry More plain, water! But it wasn't turned off in time. (and there was a full glass of water)
 
Ouch
That's a lot of liquid to spill into any device, let alone a laptop where it can seep right in between the keys
 
@SuperBiasedMan you're meant to keep yourself hydrated, not your laptop
6
 
4:02 PM
@DanPantry It looked so thirsty :(
2
 
Wow @Zak nice VBA answer!
 
I like the new badge icons, I'm glad they went with curly braces
Code review honestly looks so much better with this theme
5
 
ikr. overall the site looks gorgeous
 
I'm still not sold on the odd font in the logo.
But I like everything else
 
It's just Consolas isn't it?
CODE REVIEW
 
4:06 PM
@Phrancis in the logo? I don't think so. I use consolas in code and, at least, on windows, it looks nothing like that
 
Yup, looks about right
 
Same font used everywhere else. I think I don't care for it quite as much as I thought.
@DanPantry I think it is.
> "Inconsolata","Courier New",Courier,monospace;
 
This is cosnolas
ahhhhh. I have inconsolata on my machine.
 
Those are the fonts used, and it definitely isn't Courier.
 
Yeah, no, I'm seeing Inconsolata rather than Consolas
 
4:08 PM
I have Consolas in my machine, not Inconsolata, but I know the font isn't Courier New, which I do have.
 
We're both wrong.
That's definitely not consolas
 
Hm
It looks "off" to me
 
Looks very close to me
 
I don't know why
Like it sticks out
 
4:10 PM
 
Maybe because it's boldened?
 
I'm still seeing the beta label here.
 
@Phrancis possibly why.
@Hosch250 do ctrl+f5
 
@DanPantry Still seeing the beta label.
 
I think it's the W that looks weird
Not a very common letter to see in code
 
4:12 PM
@Phrancis Hey, that is Window's Word, not Mac Word.
@Phrancis While.
 
@Hosch250 Correct. I'm at work.
 
@Phrancis Oh, right.
Word 2013?
 
Yup
 
Word 2016 has the same theme, but Word 2010- doesn't.
I like the color theme for Office 2016.
 
@TopinFrassi I lol'ed at your I hate Java :P
 
4:14 PM
I love the 2013 suite. My old workplace had 2007 (on XP), before they finally updated to 2010 (on Win7)
 
I wish I could install Office 2010, Office 2013, and Office 2016 (365) all together.
@Phrancis It is great. The updates were really buggy when it first came out, though.
I actually had to boot into the super admin account to install them.
They fixed that about a year later.
 
I still think code.review() would look way better than CODE REVIEW
 
posted on November 26, 2015 by Zachary Gurwitz

How would I go about generating a random integer that's either between 0 and 10 or between 20 and 30? (The numbers that I chose are arbitrary.)

 
I would just prefer something more like the Beta
 
I don't really.
 
4:18 PM
@CaptainObvious rba
 
Or maybe just without the SHOUTCASE, i.e., Code Review
That uppercase W just looks weird.
HI @MAT'SMUG
 
monking!
 
How's it going?
 
Zak
@Phrancis TY, a true testament to what 3 months of hanging around on CR will teach you :)
 
	BEGIN TRY
		select @account = v_accountno from VENDORS where v_id = 4
		SELECT
		(
			SELECT	epi_lastname + ', ' + epi_firstname AS "@orderID",
					so_dateordered AS "@orderDate",
					--'new' AS "@type",
					--'USD' AS "Total/Money/@currency",
    				(
						SELECT  svslb_externalid as "@addressID",
								'en' as "Name/@xml:lang",
									CASE sdm_sdmtid
									WHEN 2 THEN epi_lastname +', '+ epi_firstname
									WHEN 3 THEN so_orderedby
									WHEN 1 THEN branch_name
									END as "Name",
What the flip is this crap??
 
@Marc-Andre Man, Java is such a mess ahah. Why can you use the static modifier in a nested class but not anywhere else. What is this sorcery!!
I'm getting dangerously close to 5k rep
 
Nice!
 
> The haircuts are great, but I’m most proud of the grades. You shouldn’t have to be rewarded to get good grades
I don't want to be his kids. :s
 
A good education is the first step to a life of success.
 
That is true, but I think you should be rewarded if you do well.
 
4:29 PM
@Phrancis Yeah! I gained lots of rep since I started my internship, which might be a poor indication of my work quality :/ ahah
 
Straight As aren't just good grades, its statistically above average.
 
I expect his kids will do a lot more in their lives and for the country than most other people nowadays.
And life isn't about rewards.
 
128
Q: Static nested class in Java, why?

David TurnerI was looking at the Java code for LinkedList and noticed that it made use of a static nested class, Entry. public class LinkedList<E> ... { ... private static class Entry<E> { ... } } What is the reason for using a static nested class, rather than an normal inner class? The only reason I ...

 
That doesn't mean you shouldn't reward people for doing well. :\ positive reinforcement is a good tool
 
@Hosch250 s/the/a/
 
4:31 PM
@DanPantry I don't put a whole lot of stake in all this 'reinforcement' thing when used with people, but I am not against reward.
 
Someone needs to tell these freaking developers that using SQL to assemble XML files is crazy.
4
 
I'm just saying that getting the grades should be reward enough.
 
@Marc-Andre I still hate it. :p
I always need to worry if I need to use size(),length() or length depending on the data structure
Though I'm not doing much java, which explains my lack of habits
 
@Hosch250 Cough... Swag... Hats... :-D
2
 
@TopinFrassi But this is not a problem with Java per se, it's a problem with the Java library. Those are still two different things!
 
4:33 PM
@holroy We are around without swag and hats. While nice, they aren't what is really important.
 
@holroy Don't forget imaginary internet points, that's the most important ;-)
2
 
The static inner class thing is a problem with Java though (since it's in the JSL normally)
 
@Hosch250 Unfortunately it is not, grades are worth very little now... and getting good grades at least to me never felt rewarding
 
@Phrancis They aren't exactly imaginary. They have value by giving moderation ability.
 
@Marc-Andre True. I hate Java Library even more than I hate Java itself. :p
 
4:34 PM
HeHe... wrong association... I was thinking more along the lines of grades, and rewarding, and your previous comment!
 
@DanPantry That's too bad.
 
@TopinFrassi lol
 
Getting good grades is pretty context dependent especially if the people grading you know you personally at all. A lot of bias comes into play then.
 
@DanPantry I felt some proud in good grades. But the sleep I got not studying for these grades makes me much more happy. lol
 
4:35 PM
@TopinFrassi Where is your internship ?
 
@SuperBiasedMan I've never seen my professors, and I've only talked to a couple through the phone.
 
@Hosch250 Ah, well as I said it's context dependent. I was (and still am) friends with some of my lecturers from college.
 
@Marc-Andre You're from Quebec right? I'm in Varennes, working for the canadian government about R&D on natural resources
 
Zak
As with all reinforcement, you have to be careful just exactly What you're reinforcing
Generally why some of my favourite advice about teaching maths is that you should never praise "having the right answer", you should praise the efforts people make
 
@TopinFrassi Ohh nice! R&D! And yeah I'm from Quebec city specifically
 
4:38 PM
@Zak That's because you can get the right answer by a fluke - showing your working shows that you understand why you got to the answer.
That's why I prefer Maths as opposed to something like.. Biology. Biology is a memory test. Maths tests your understanding of the problem.
 
Yeah, that's a good way to look at it. Unfortunately grades undermine that because they're all about ranking against other people.
Well it's partly that, but also because someone could be lazy and do nothing but find a topic easy and get it right a lot, while someone who finds it really complicated work hard. Rewarding/praising the lazy correct person sends a bad message to both.
 
"Something small, like an atomic bomb" +1 — PyRulez 22 hours ago
2
 
possible answer invalidation by J Dub on question by J Dub: codereview.stackexchange.com/posts/111834/revisions
 
Zak
@SuperBiasedMan My pre-university education in a nutshell
 
@Marc-Andre Yeah but it's R&D that isn't related to computer sciences :p We're working with scientists who do R&D. We're "just" coders.
 
4:41 PM
(sorry for the outbust, this stored procedure really is terrible)
 
Zak
@SuperBiasedMan Spending a decade putting in minimal effort and getting top grades anyway doesn't exactly build good habits.
 
Nice, Quebec is a really nice city. I'm going there this saturday to see the collegial football finale
 
@Zak No, that is why most geniuses actually do less outstanding work than almost-geniuses who work.
My father's oldest brother was a math genius, and ended up being a used car salesman.
 
@Hosch250 It took me some time to process "father's oldest brother". You mean, uncle? :p
 
Yes. My uncle.
 
Zak
4:43 PM
@Hosch250 Fortunately (maybe? who knows) I blew up spectacularly around 17 - 20. Still in the process of re-learning how to effectively approach this whole "life" thing
 
Now, if someone is getting bad grades, though, it can tell them to not try to enter a field that focuses on that subject. Grades are about information.
But, working toward a grade and receiving it should be a good reward. Just like working for money to buy a widget - the widget is the reward.
Enough good grades might buy you a free ride into grad school too, or a good job.
 
This stored proc in a nutshell:
SELECT (
  SELECT (
    SELECT (
      SELECT
        /* insert business logic here with lots of magic numbers
        * and no documentation,
        * and a bunch of commented out code for no apparent reason */
      FOR XML PATH('PostalAddress'), type )
    FOR XML PATH('Address'), TYPE )
  FOR XML PATH('PostalAddress'), Type )
FOR XML PATH('OrderRequestHeader'), TYPE
GOTO ERROR
 
@Phrancis GOD, MY EYES ARE BURNING. STOP THIS MADNESS
3
 
@Phrancis wat wat wat wat wat wat wat wat
 
Not even joking. #FML
 
Zak
4:47 PM
@Phrancis I'm guessing you're about to become today's psychotic axe-murderer
 
Getting pretty close to it. That's not how I envisioned spending my Thanksgiving day at work lol
Now, to clean this up, all you'd have to do is get the values you need, pass them to a C# class and let it do the XML stuff, and call it a day
 
On a sidenote: Does anyone know if one can put php code into the snippets here on Code Review? And if so, how to do it?
 
Zak
@Hosch250 "Something small, like an atomic bomb" - oh WorldBuilding, you are truly a joy to behold.
 
I don't think you can do PHP in snippets
David Haney on September 16, 2014
On Stack Overflow and our other code-related sites, creating a minimal, complete, and verifiable example is the best way to get an answer to your question. We’ve always loved JSFiddle and sites like it because they let both askers and answerers reference runnable, working code that demonstrates their problem or solution.
Pretty sure it only supports client-side stuff
 
@Phrancis Which is a good thing. :p
 
4:51 PM
@Phrancis Did the egyptians make that?
For a second I thought it was a more crap version of the Pyramid of Giza
 
LOL
BEGIN CATCH
  GOTO ERROR
END CATCH

ERROR:
  RETURN
Best part
 
Ahahahah
 
@Phrancis Thanks for the link. I'd seen it before, but didn't know where. Even though understandable, it would have been nice just now to do php...
 
@Phrancis oh god
This almost tops our SQL code.
every single stored procedure is wrapped in a try-catch which returns an int and a string for everything for any error caught (instead of letting the error propogate)
and every stored procedure also uses dynamic sql.
every. single. one. yes, including simple gets.
 
wow, that's terrible
 
4:55 PM
this is somehow "more efficient" than the sql code EF generates
 
There's days where you'd question your insanity, and days where you just know you're insane
 
There's nothing efficient about dynamic SQL, I avoid it like the plague
 
the real reason is that we want o track every user's invocation of a sproc.. i'm not sure why we want to do that when we could do it at the application level for free (and not have to do some weird auditing where the database becomes aware of user ids)
 
Any opinions about this?
@Transactional
class CoordinateService {
    Coordinate getOrCreateCoordinate(int galaxy, int solarSystem, int position) {
        Coordinate.findOrSaveByGalaxyAndSolarSystemAndPosition(galaxy, solarSystem, position)
    }
}
 
@skiwi Ogres have layers.
 
4:57 PM
Coordinate.findOrSaveByGalaxyAndSolarSystemAndPosition is something provided by the Grails/GORM framework
I'm wrapping it in a service
 
findOrSaveByGalaxyAndSolarSystemAndPosition
Good naming
 
@skiwi your method names are not a game of fking scrabble - you don't get points for putting more characters in them
 
Well, at least they are clear
 
they are, but 80 - 120 character limit per line means you woudln't be able to do much with that method
 
What's the @Transactional for?
 
4:58 PM
@DanPantry I don't think Grails follows that guideline
 
0
Q: Line height in comments is too small

Adriano RepettiLine height in comments is too small and it's partially covered by author's name background: Viewed with Chrome 46 on Windows 7.

 
@Phrancis To make all methods in the service transactional, ie. that they can be rolled back
 
Ohhhh ok makes sense
 
In a sense I'm just wrapping a method call, but I'm also making it transactional and hiding that verylongmethodname
And as replacement I offer a notsolong method name
 
Hi, @JensHorstmann
We have another C# fan here.
 
5:05 PM
possible answer invalidation by jackwilsdon on question by jackwilsdon: codereview.stackexchange.com/posts/111855/revisions
 
Yeah, C#FTW
Hi @JensHorstmann!
 
5:16 PM
Well, I found documentation about this crazy process of which that ugly stored proc is part of, which is a refreshing surprise.
Only annoyance with it is apparently whoever wrote it does not understand the difference between i.e. and e.g.
They need more Oatmeal in their life.
> Place a dollar limit per time period (i.e. month) for a patient.
cringes
 
If your code works, but you feel that it can be improved you should move this question from Stack Overflow to Code Review. — Pshemo 46 secs ago
This question looks like it might be a pretty good fit for Code Review.SE, provided that (a) you want every aspect of your code reviewed, not just some, (b) your code is already working, and (c) you're asking for a review of concrete, real code, not abstract design (whether or not it's expressed as code). If you agree with all of those, please read about what's on topic, and, if your question fits that, delete it here and repost it on CR. — Phrancis 49 secs ago
 
Zak
MRW I see +100 rep, then realise it's because I signed up to another community :(
 
MRW?
 
Zak
My Reaction When
 
OIC
 
5:29 PM
I thought it was an abbreviation for a sort of car.
 
HI @JAMAL
 
God, logged on today and saw this:
 
Question better suits to be posted here codereview.stackexchange.comPrince Mani Gupta 34 secs ago
 
@TheCoffeeCup Keep it up and you'll max out today!
 
5:33 PM
@Phrancis Will hope to :)
 
0
Q: Write nested `for` loops to produce following output

JavaBeginnerMy task: Write nested forloops to produce the following output with each line 48 characters wide: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~+~~+~~+~~+~~+~~+~~+~~+~~+~~+~~+~~+~~+~~+~~+~~+~ +~++~++~++~++~++~++~++~++~++~++~++~++~++~++~++~+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...

 
This would be off-topic for Code Review as it is example/stub code. Please see A guide to Code Review for Stack Overflow users for more info. — Phrancis 25 secs ago
 
@CaptainObvious Not done correctly.
First off, you nested your loops for the wrong lines.
 
@Phrancis hi
 
@Hosch250 Works fine just ugly
 
5:38 PM
@Phrancis Works fine, but done incorrectly.
 
Well, that's what we're here for, no? :)
 
Yep. I was just pointing out something to review.
I could do it myself, but I'm working on writing about the Napster lawsuit for class.
 
@Hosch250 Oh, I see what you mean... everything is pretty much hard-coded instead of doing it "smart"
 
It's so.... beautiful....
I think I have a tear in my mechanical eye
 
It's truly a thing of beauty :)
 
5:47 PM
I haven't really gotten used to the new design yet.... is there any chance we could have the beta-blue back?
 
Boooooooooo
Down-stars message
2
 
</sarcasm>
 
Fixed sarcasm scanner settings
 
1
Q: Java - Custom Encryption

PreFiXAUTI made a custom Encryption Library/Class which allows to en-/decrypt Strings with custom charset. I think you'll get what I mean with that when you take a look at the Code. Since I haven't much Crypt-Knowledge, I'ld like to ask if someone who knows about it could tell me if this is "safe". I kno...

 
In other news, @Phrancis has just broken the record for the number of stars applied to one message in this room: chat.stackexchange.com/rooms/info/8595/the-2nd-monitor/…
 
5:50 PM
I lost 3 privileges :(
I guess I'm no longer a trusted user
 
@SimonForsberg Wow !
 
@syb0rg Nope, you've been down-graded to a trusted robot.
 
@SimonForsberg Untrusted robot, you mean?
 
Nope, trusted robot.
 
for (int i = 1; i <= 4; i++){
    for (int j = 1; j <= 12; j++){
        System.out.print("~");
    }
}
^^lol
 
5:52 PM
@Phrancis Exactly.
 
Yeah they totally have the wrong approach
 
@Phrancis "~"
 
My teacher can't decide whether it is 'BitTorrent' or 'BitTorent'.
 
0
Q: Jacob's Ladder compression

thexivI'm currently interested in a logical decay algorithm which will need me to have the correct coordination of 3 bytes. I have 2 of them, initially. After that, I have to get 2 from the one, but in that I have the important key, they all together escalate into the previous one. That is the criteria...

 
@SimonForsberg Would that also be network-wide?
 
6:00 PM
Holy mother of FGITW on that Java beginner Q
 
Very good. But, what about the requirement of using nested loops?
 
@CaptainObvious four answers already? Bah, screw it. There's room for one more.
2
 
200's is the correct one, I think.
 
It usually is ;)
 
The rest of you have excellent points, and I like how @TheCoffeeCup splits it into methods. I did upvote you all, but his tips the scale because of the nested loops thing.
 
6:06 PM
I was going to address the nested loop too, but by the time I had written what I did, others had already beat me to it
 
@Hosch250 200 OK
 
@Mat'sMug 404 NOT FOUND
 
Oh well, there's plenty of rep around for everyone to share!
 
@Phrancis Yeah, you have to be fast for these easy questions. Especially on Thanksgiving.
 
0
Q: Dynamic variables in PHP from enum

holroyRelated to the question Verb conjugator for French, I was asked an question on whether one could summarize all the $exceptionIs<NAME_OF_EXCEPTION> = $exceptionmodel-> getValue() === ExceptionModel::NAME_OF_EXCEPTION lines. In other words, can one make dynamic variables out of the comparison of a ...

 
6:10 PM
I tried to teach the OP to think about his code! And we got some nice answer on that question!
I think now @SimonForsberg has one of the best answer on the question!
 
It's getting hard to answer C# and Java questions. There are many quality reviewers.
(I don't know about the rest, I don't review those 'cause lack of knowledge)
 
So now you have to learn a new language and ask questions :D
 
@TopinFrassi wait, we're fully graduated now.. maybe Skeet will start reviewing code!
 
@Mat'sMug I don't see the link between the two
 
@Marc-Andre I guess that should be it :p But I don't feel like learning something new. I'll probably have upcoming questions though :p
@Mat'sMug :o I'm not sure he's that kind of guy but eh, that would be cool to see how he works stuff out
 
6:14 PM
@Marc-Andre I always try to aim for quality when I answer FGITW'd questions.
not that there's anything wrong with the quality of the previous answers, of course.
 
@skiwi never underestimate the downsides of a [beta] logo
 
@Marc-Andre I haven't actually even tested that code yet...
 
I don't think that the value of Code Review is actually in the code that reviewer produce, I think it's more of what you learn when refactoring and cleaning things up!
 
Does SO do anything for birthdays? Like an inbox notification or anything?
 
I guess I'm just behind the new stuff. More questions atm on the Top Questions page are about animation, async, mathematics or obscure web tools. lol
 
6:18 PM
And your answer took care of the learning part, so even if you did not test your code I do not worry much
 
C# style:
 
Welcome @UNICYCLEZRDEBESTINDEHERE
 
Console.WriteLine(string.Concat(Enumerable.Repeat("~~~", 12)));
Console.WriteLine(string.Concat(Enumerable.Repeat("~+~", 12)));
Console.WriteLine(string.Concat(Enumerable.Repeat("+~+", 12)));
Console.WriteLine(string.Concat(Enumerable.Repeat("~~~", 12)));
 
Humm wonder if Java 8 could help clean up too, but I'm not sure we could be as clean as the C# solution
3
 
6:22 PM
System.out.println(StringUtils.repeat("~~~", 12);
System.out.println(StringUtils.repeat("~+~", 12);
System.out.println(StringUtils.repeat("+~+", 12);
System.out.println(StringUtils.repeat("~~~", 12);
That should work for Java.
 
StringUtils is not pure Java, you have to import another library for this ;) It works but still.
 
Ah.
Missing closing )'s.
 
System.out.println(String.join("", Collections.nCopies(12, "~~~"));
System.out.println(String.join("", Collections.nCopies(12, "~+~"));
System.out.println(String.join("", Collections.nCopies(12, "+~+"));
System.out.println(String.join("", Collections.nCopies(12, "~~~"));
@Marc-Andre I challenge you
println "~~~" * 12
println "~+~" * 12
println "+~+" * 12
println "~~~" * 12
There you have Groovy ^^
 
@Marc-Andre you call that clean!?
@skiwi gotta love groovy
 
Python 2:
print "~~~" * 12
print "~+~" * 12
print "+~+" * 12
print "~~~" * 12
 
6:29 PM
Eh, I don't know how I got here but lol at this... github.com/grosser/textpow/blob/master/lib/textpow/syntax/…
 
@SimonForsberg I did not had a hard time reading it so yeah I think it's clean.
 
source.groovy.groovy.syntax as filename
That confused me for a moment
 
Console.Write("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n~+~~+~~+~~+~~+~~+~~+~~+~~+~‌​~+~~+~~+~\n+~++~++~++~++~++~++~++~++~++~++~++~+\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~‌​~~~~\n");
 
I got to go I need to work and there is so much activity here that I'm easily distracted see you all later!
 
@TopinFrassi What?! You found a cleaner way?
 
6:30 PM
I win. :p
 
0
Q: Array implementation of Stack java

Stefan RendevskiAs an exercise, I wanted to make an array implementation of Stack, including most of the methods from the native Java Stack. I'd like to know the following: Does the code follow good programming principles? Is the code readable/understandable? Are there any redundant fields/operations? Is th...

 
6:50 PM
0
Q: IP lookup heading almost overlapping first entry

JamalI don't quite remember what it was like pre-design, but it now looks like the heading is nearly overlapping with the first entry on the page. It's just a little hard to tell with that entry scribbled out. Perhaps there doesn't need to be much white underneath the horizontal line.

 
Whitespace (first line only):
S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
T	L
S S S S S T	T	T	T	T	T	S L
I should finish it and post it for review.
It shouldn't be banned here seeing as BF isn't.
I could be the first to create the tag.
 

« first day (936 days earlier)      last day (3087 days later) »