« first day (431 days earlier)      last day (3578 days later) » 

12:01 AM
@chkun203: I like that the Win8 shortcut keys document mentions the keyboard shortcut for printing the document at the end.
It made me laugh :)
 
@DanLyons that makes sense. So maybe checking internal state is too granular or not even possible, so you test high-level behaviors instead
 
@SimonAndréForsberg I'm glad someone was able to understand what he wanted
 
@Mat'sMug LOL
Fixed a boo boo in a Stored procedure and now I get to go home!!!
BIGINT IDENTITY in the table and then VARCHAR(5) in the SPROC....took us like 4 hours to find it because none of the exception handling pointed us anywhere!
anyway, have a good night, see you all tomorrow.
@Mat'sMug did you accept my request?
 
12:19 AM
Yup
2% ... later @all!
 
12:39 AM
Lol. That's awesome @DanLyons.
 
12:53 AM
Meh, you guys are all miserable......
How can you leave me at 195 yesterday?
 
aw, didn't spend many many votes... you probably would have capped if I still had that crap job where I'd spend all day here on CR ;)
 
lol
 
@rolfl <Nelson>Ha ha</Nelson>
2
 
I wasn't paying attention. :-/ But from both of my zombies, only one received one upvote.
Speaking of which: @Yuushi, any idea about this question?
http://codereview.stackexchange.com/questions/41690/a-variant-of-state-pattern-c-template-fsm-without-state-creation-destruction
 
1:01 AM
@Jamal Let me take a look...might be a bit slow today
I'm coughing up a small storm
 
@Yuushi Okay, take your time. :-) It's mainly about inheritance.
 
@Jamal Ternary for that? You sure?
 
@rolfl Hm... maybe not. I could just leave it out; the first part is probably better.
 
You may be right, but I thought ternaries had to have a value.....
They do in Java, they have to be assigned to something.
C++ may be different.
 
I haven't even tested this bit of code, but I can remove it anyway. Sometimes I get a little too eager to recommend it. :-P
 
1:10 AM
I don't know C++ but I'd be surprised if a ternary can be legally used like this
still, +1'd for the first paragraph alone ;)
and the curly braces
 
I do hope I learn much from this OO class. I really want to expand my reviewing capabilities.
 
@rolfl Perfectly legal C++ to have a ternary that effectively has a void return type
 
hmm good to know
and weird
 
^^^ that
 
@Yuushi So what I have was okay?
 
1:17 AM
@Jamal It'll compile, yeah
for wierd: (void)((i == 1) ? std::cout << "Yes\n" : std::cout << "No\n");
 
lol so it's in the barely legal category then.. shouldn't be a recommended-for-clarity usage, ..right?
 
Okay. I knew that ternary does a "shorter" if/else, but I didn't know that you could put anything in them.
 
the (void) isn't necessary
and yeah, I would generally recommend against using ternary for side-effect only computations
 
Which reminds me... if my SO answer still okay as well?
 
ternary in a loop test...that's a new one
I've...honestly never seen that before
 
1:22 AM
^^ my first thought was exactly that: what the...
 
My neither
 
better than My nether
 
0
Q: JSON.NET Custom Serialization Using Custom JsonConverter

Richard CraneThis code is doing custom serialization of a List. It works fine when the list is the root object. Unfortunately JSON.NET throws an Exception if the List is a property. Here are the highlights. 1) We are using a custom JsonConverter class. 2) We are doing this to handle large lists so that we...

0
Q: Values incorrectly being set with DLL

FatalSleep(I've been working on a DLL for GameMaker which would explain the odd data types I use.) The DLL I am working on let's me create 3D byte-arrays. However, I've run across an issue with my variables in my DLL. I've done a very, very, very extensive run down and I've isolated the issue to the code b...

 
honestly, a loop test condition only really needs to evaluate to true/false
 
Hi! Unfortunately (or perhaps surprisingly, if you haven't seen our help center) peer reviews aren't debugging sessions. We review working code. Finding bugs in broken code, or code that doesn't do what it's supposed to be doing, is beyond the scope of this site. — Mat's Mug 13 secs ago
 
1:28 AM
so it should "work", for some definition of work
I don't know if it'll do what they want it to do though
and I don't really feel like expending the energy to find out
I'm going to put that squarely in the "don't do that" camp
 
@CaptainObvious off-topic as well..
 
@Mat'sMug Good call.
I was just about to vote to close it
 
what does that mean?
Hmm... well the code is literally doing exactly as it should. However, then again it's not. I don't believe I've actually committed any mistakes to warrant the issue at hand. Hence posting here. — FatalSleep 2 mins ago
lol
 
It always amuses me when someone clearly says that something doesn't work, then claims that everything's working.
 
1:45 AM
0
Q: PHP Trait Singleton

SpencerAn implementation of the singleton pattern in PHP using a trait (added in 5.4). Is there anything missing, any ways to create a second copy of the class? trait Singleton { static function instance() { static $instance; if ( is_null( $instance ) ) { $instance = new...

 
@Jamal It's a zen koan: please help me fix my bug-free code.
 
Can this be migrated to SO? — FatalSleep 1 min ago
@rolfl @Jamal can it be migrated to SO?
 
@Mat'sMug No, because it's working exactly as expected. :)
 
lol
 
Maybe it could be migrated to "Metaphysics"?
 
1:52 AM
0
Q: Iterator for a list of objects

JavaDeveloperGiven a list of objects, return an iterator for such a list. Looking for code-review, optimizations and best practices. Verifying complexity to be O(n) where n is sum of all objects, including elements of collections if contained. previously solved here. public class FlattenIterator implements I...

 
Hey, whaddya know. I'm a !
2
 
Congrats!
 
@Jamal Looking at that question, I'm convinced there is a better way...I just need to try and flesh something out
 
@Yuushi The inheritance one or the multithreading one?
 
@Mat'sMug I should probably seek treatment rather than accept congratulations...
3
 
1:55 AM
@Mat'sMug Migration has failed.
 
Q Ban?
 
Yup
 
@Jamal Inheritance
 
Hmm
 
2:12 AM
@Yuushi Okay. I had a feeling there was a better way as well, but I don't know what to say. I just usually "know" when something looks smelly.
 
0
Q: Is this interface structure/setup correct?

Jerry DodgeI'm working on wrapping the last.fm web API. I'm trying to use Interfaces to be able to easily make calls via functions which return an interface (as opposed to an object which would need to be free'd). I believe I have the fundamentals down, but I'm afraid I may be doing something wrong, and nee...

 
Ugh. I need a UPS.
Just lost half my answer :(
 
Just don't plug it into itself. :P
 
:) I wonder if I'm getting that stuff anytime soon. 6-8 weeks is long!
 
3:07 AM
Ah, ...ended up finishing the answer on my phone!
And TTGTB.. good night @all!
 
Goodnight!
 
3:26 AM
...now I can sleep. ;)
 
0
Q: Numerically stable sum of `double`s

SnowbodyIt's known that if you naively sum up a collection of arbitrary doubles, the end result may differ, sometimes significantly, from the actual sum. This is due to the loss of precision involved in representing real numbers in 64 bits. In some cases the rounding is catastrophic -- particularly if yo...

 
4
Q: Burninate the CSharp tag!

Mat's MugTag csharp has 0 questions asked here. Let's burninate it before its existence becomes widely known... ...or make it a synonym of c#.

Noooooooooo
 
0
Q: Very small start to MVC refactor in iOS app. Took me all day

user3344977I started to refactor my app to MVC today. I wasted a lot of time because of simple mistakes. One was I kept trying to access the getter method inside of my custom getter method, which just causes and endless loop of gets. Even when I figured it out, I repeated this mistake several times. I thi...

 
4:02 AM
0
Q: Winforms Graphical Timer Control

user3189142This is a Graphical Timer control I made for C# Winforms, which taught me quite a bit (it is my first Custom Control). The code below is a fully working application with the Graphical Timer, some buttons to control it, and a listbox showing the sweeping angle of the pie (for debugging purposes). ...

 
4:15 AM
0
Q: ViewStateManager for more than just Controls?

Robert PetzOkay - so basically I have a login form that has a couple of 'states' it needs to display (connecting, input credentials, authenticating, invalid credentials, etc...etc...) - in the past I've literally tossed my views into my DI container and bound a ContentControl to a property on my ViewModel t...

 
4:49 AM
0
Q: What's a good simple way to combat n+1 problem in PHP

user3265472I'm trying to better understand performance in PHP, one issue I'm thinking about is the n+1 problem. By n+1 I mean something like this: $posts = Posts::getPosts(); foreach($posts as $post) { $comments = Comments::getComments(array('post_id' => $post->id)); // do something with comments.. } ...

 
5:03 AM
Hello, world!
 
That is technically a valid PHP program.
 
@Phrancis
 
@CaptainObvious son of a bitch
i was writing an answer Dx
oh well screw it
 
5:18 AM
@200_success Yeah, I just have a problem with this combination of words: valid PHP
 
this isn't really a question about PHP though so much as a question about ORM
i mean he could have had the same problem in any language
basically my answer was along the lines of "write something like $post_ids = Posts::getPostIds();" and then point him towards a good ORM, mayby I'll just leave it as a comment
 
@Phrancis valid PHp is kinda my thing :/
 
<?php this->sucks;
 
^ not valid
 
$
 
5:23 AM
@AlexL You must be one of the very few people who do PHP right
Oh. This work better?
 
there are a lot of nice PHP projects out there actually
 
<?php $this->sucks;
 
@Phrancis Elias Ootegem knows what he's doing as well
 
they're just outweighed by a lot of crap code outsourced to low-paid people who don't give a crap
 
@DaggNabbit I like the way it looks, Java and PHP are tied for looks in my book
 
5:25 AM
ehh, the OO stuff is pretty alright, it's the C-like stuff that was there before that... combined with the OO stuff.. kind of a mess
 
I'm actually using PHP for the code challenge...
 
@DaggNabbit I believe you.
 
but there is some really nice done in PHP... like redbeanphp.com ... probably my favorite ORM ever
stuff like that does a decent job of redeeming it i think
 
The other day I tried out common lisp, just for the heck of i
 
@DaggNabbit you may very well be right. Though that may well be the 1% of PHP programmers...
 
5:29 AM
why did that get migrated to programmers anyway
hmm i can't strikethrough
 
@DaggNabbit You can can't?
 
i <s>can't</s> can
can't
 
Use ---
 
lol how do you do it
ahhh
can't can
yay
 
^^ that
 
5:31 AM
testing... test test
 
R.I.P., "n+1 problem"
 
Does Micro$oft own all programming languages that end with an 'L'?
 
COBOL?
Pascal?
APL?
 
@Phrancis which ones did you have in mind anyway
 
HTML XML SQL
 
5:42 AM
i hope they don't own those
 
But @200_success evidently knows better
 
if they do they sure were sneaky about aquiring them
 
Yeah I think I mis-assumed (is that a real thing?)
 
I usually associate XML with Java, those two seem to have some weird love affair going on
3
maybe Oracle secretly owns XML and SQL :p
 
I usually associate XML with sucks
 
5:46 AM
i wonder if it will eventually run its course
but there's nothing really good to take its place, maybe JSON but that's it
 
XML = <thing>This Is A Thing</thing>
 
With Thing AS {
    Thing
}
is that so much better??
 
@Vogel612 Marginally
 
i mean at a basic level XML isn't bad, but when you get into DTDs and schemas and all that it's kind of a mess
although i have done some pretty cool stuff with XSLT
back in the XHTML days
 
XHTML.... Haven't heard that in a while
 
5:51 AM
J2EE still uses that....
 
0
Q: what is wrong with this approch?

Nagrifor the hiring process a company gave me this test : Q) Consider Share prices for a N number of companies given for each month since year 1990 in a CSV file. Format of the file is as below with first line as header. Year,Month,Company A, Company B,Company C, .............Company N 1990, Jan, 10...

 
^^ the spelling is wrong with this approch
 
@Phrancis Actually, an approch is a special type of design-pattern. It's what all the good guys are using these days. It works for every project
 
Let me edit it before it gets Jamalized
BOOM
0
Q: What is wrong with this approach? (Python)

NagriFor the hiring process a company gave me this test : Q) Consider Share prices for a N number of companies given for each month since year 1990 in a CSV file. Format of the file is as below with first line as header. Year,Month,Company A, Company B,Company C, .............Company N 1990, Jan, 10...

 
0
Q: Kahan summation

Jerry CoffinInspired by another question, I decided to implement Kahan summation in C++ (though that question implemented a different summation algorithm). Since I was writing C++, I decided to make the code generic. Although it's a little difficult to imagine anybody bothering to use Kahan summation on sin...

 
5:58 AM
@Phrancis It is on topic, right?
 
As far as I can tell, though the tone is unusual... I sucked at this, can you help me make it better so I don't lose an employment opportunity next time?
 
Yeah, he makes it sound like the code has bugs
 
He sounds a bit desperate
 
@Phrancis it's even worse...
don't use tag-names in titles. SE adds the most popular tag at the start of the title either way..
 
If this continues I won't get a job in a good company
Hmmm....
 
6:03 AM
Thanks @Vogel612
 
Monking
 
Hi @skiwi
 
programmers.stackexchange.com/a/247341/44277 <- answered it anyway :p first programmers answer
 
and TTGTW
 
TTDCA2AM (time to drink coffee at 2 AM)
 
6:05 AM
8am here :o
 
11 pm here :)
Ha, I got in an edit on that question, yay!
 
@DaggNabbit
 
Hello there and welcome to Code Review! Your question is totally correct here, and it's good that you came, at least from what I see as a python greenhorn of the worst kind. I just edited your question a bit, to take out that tone of "desperation". If you disagree, feel free to roll back the edits in revision historyVogel612 7 secs ago
@AlexL that's almost as if we were ganging up on the poor guy...
 
@Vogel612 It's a collective push towards self-improvement. He said his feeling were hurt, maybe if we all could improve his question, he'd feel special!
 
Nice edit @Vogel612 . Do you know of an easy way to adjust his alignment on the demo.csv: section?
 
6:10 AM
@Phrancis ty sir
 
morning @all
 
Hello @chillworld
 
Edit war!
4
 
@200_success as long as we beat @Jamal to it, we all win ;)
 
@200_success Do we need ?
@200_success During your grace period, go ahead and apply the no-language syntax-highlighting.
 
6:16 AM
@Phrancis He got to it... Rev #7
The guy probably really thinks he messed up
 
Just trying to make this thing look like a million bucks. :-)
 
@Jamal you should check the original post...
 
@Phrancis thanks and no
 
I have, and I've seen worse.
2
 
Hey @Phrancis, do you play on DE.SE? Makin queries and all?
 
6:20 AM
@AlexL Now and then
If you want to play around with DE.SE (we call it SEDE) @rolfl is a maestro with it.
 
@AlexL don't call it like that... DE.SE makes it sound like German Language. either make it SEDE or Data.SE
 
Wonder if there's a way to sort out the most revised questions and answer on CR
Oh, sorry guys, I've never talked about it before
 
hey @Phrancis
did I miss something good here?
 
@AlexL good question. I feel certain there is, but I'm not sure in which table(s) those are stored.
@chillworld just a very bad post...
 
already closed if needed?
 
6:26 AM
Not closed, just edited about 9 times
4
Q: Find the peak stock price for each company from CSV data

NagriDuring the hiring process, a company gave me this test: Q) Consider Share prices for a N number of companies given for each month since year 1990 in a CSV file. Format of the file is as below with first line as header. Year,Month,Company A, Company B,Company C, .............Company N 1990,...

Just look at edit history :)
 
Jamal just got in another
 
And now I have to go to bed. Goodnight!
 
Haha night
 
@Jamal you are more of a grammar freak than I am. Kudos.
Bye
 
@Phrancis Eh, mostly on here. I get used to it elsewhere, where I cannot edit directly.
4
 
6:32 AM
not bad 9 edits, but it's a good question (did the review)
 
We're pimping his question a lot. He better come in here and thank us
 
@Jamal I think covers it.
 
and re
 
@Jamal I just made this (also @AlexL )
 
where are the docs for SEDE? Is it just /help?
i tried playing with it a few times but it didn't like me
 
6:44 AM
@DaggNabbit it uses standard SQL Server syntax. Are you familiar with that language?
 
no, how different is that from standard ANSI SQL?
 
Pretty much the same, as far as I know
 
like, i tried to do a "where" clause using a table alias and it didn't like it
so i gave up
 
The table alias support may be a bit wonky using the web interface
 
pretty sure using that [bracket notation] for aliases is not standard either
 
6:47 AM
I try to keep it simple, maybe you ought to try a temp table? Some native functions are disabled in web interface
[bracket notation] is standard, though less common. With brackets you can allow reserved characters to be used in column names and such
Anything with a space in it needs brackets
 
hmm, didn't know that was standard
 
Yup
 
If someone wants a riddle : royalsatwork.nl/riddle
 
SELECT MyColumn AS FooBar works with no brackets, but SELECT MyColumn AS Foo Bar will throw a syntax error
 
find it a good strategy for checking someone's competence
 
6:52 AM
SELECT MyColumn AS [FooBar] or SELECT MyColumn AS [Foo Bar] both work all the time
 
hmm, wonder what edition of SQL standard that came from
unless it was there the whole time and i never noticed?
 
That's the same as MySQL uses backticks
which are hard to type in chat :)
 
Wait I got my syntax mixed up a bit... brackets are for column names with reserved characters
Aliases and such, instead quotation marks
SELECT [My Column] AS 'Foo Bar'
Or fully referenced SELECT [MyDatabase].[MySchema].[MyTable].[My Column] AS 'Foo Bar'
 

« first day (431 days earlier)      last day (3578 days later) »