« first day (447 days earlier)      last day (3573 days later) » 

8:00 PM
lol
Their code base has 20 million lines.
I bet there is not seriously that much to code.
 
Well you have to do something after it's all done
 
@JeroenVannevel I bet their have inefficient coders. Agree?
 
@HassanAlthaf You almost convinced me
 
@JeroenVannevel Zuck was too lucky to be rich with just a single website.
 
But no, you're wrong
Or at least: you can't know
 
8:05 PM
I know I am wrong, they are obviously having the finest developers.
 
unless you have a project with the size and capabilities of facebook under your belt
 
nah, they're all at Google
 
@Mat'sMug wah?
Let's make a Program,
Which is basically a loop.
It keeps on writing
Until the file has 45 million + 1 lines.
And we'll have more lines than windows XP operating system
l0l
How's my idea?
 
nearing troll status
 
for() {
fwrite()
}
 
8:08 PM
@All, recommended reading: slash7.com/2006/12/22/vampires
131
Q: The Help Vampire problem

Barry KellyWhat is Stack Overflow's long-term solution for the Help Vampire problem? Quote from article follows: Identifying Help Vampires can be tricky, because they look like any ordinary person (or Internet user, whichever is lesser). But by closely observing an individual's behavior using this hand...

 
l0l
Vampire problem.
 
@HassanAlthaf - that's specifically aimed at you, actually.
 
Can't say I wasn't thinking the same
 
Hm, this new guys could use a little help: codereview.stackexchange.com/a/58065/12390
 
@rolfl seriously?
 
8:11 PM
3
A: Better way to implement screen wraparound?

mleyfmanThis situation calls for a modulus operator. The modulus operator returns the remainder from a division. So 5 % 2 = 1, 10 % 15 = 10 and so on. This is because 5 goes into 2 twice, with remainder 1. This gets a bit tricky with negative numbers, as -5 % 2 could either be -1 or 1, since -5 = -4 + -...

 
@HassanAlthaf yes.
 
I wanted to add extra info to his answer, NOT hijack it...
 
@rolfl prove it.
 
he deserves more votes
 
Holy moly! I unignored and suddenly my chat bar became two times bigger.
 
8:12 PM
l0l
 
Sorry, but this is getting out of hand. Specifically addressing the mods now, please deal with it.
 
One more week of work left
time's gone fast
Tuesday I have a company wide presentation of my PoC
 
@HassanAlthaf - I have very few tools available to me as a moderator. I can talk to you, or I can suspend you. There is not much in between. If I suspend you, you lose access to all of stack-exchange chat for the whole suspension period.
So, having said that....
Code Review's chat room is not the place to ask people to help you.
whether it is to start your next project, or whatever.
 
@rolfl I see, so in short, don't join multiple tables on the same value?
 
we tolerate a lot of off topic conversation, but, you can't pester people for things that are off-topic.
Now, we do help people a lot in here, that is true, but, it happens the other way around
we offer people our help, we don't respond to demands for it.
more importantly, it is part of my role to ensure that it does not get out of hand.
user image
7
Right, moving on.
 
8:20 PM
lol
 
@Phrancis if one of the tables has multiple records returned, then no.
 
Gotcha, good rule of thumb thank you.
 
My blood type is C++ — Cole Johnson Sep 28 '13 at 5:34
 
My blue clock question must be the least thrilling I've ever had
220 views, a bounty, 2 comments and only 5 upvotes
 
@Mat'sMug Why am I tempted to write a bot in Brainfuck for that?
 
8:28 PM
@JeroenVannevel i read that way too fast and went looking in bio.se
3
 
@MattGiltaji Yeah, I kind of made the worst possibly typo there so you might have been in the right place
 
@SimonAndréForsberg
 
@SimonAndréForsberg Why should you not do that?
 
@skiwi Because A) It's Brainfuck. B) It's PCG.
 
I'm back. Anything new?
 
8:30 PM
@SimonAndréForsberg I was trying to ask a rhetorical question... :D
 
@SimonAndréForsberg that adds up to a lot of SE rep in my mind
 
@Mat'sMug Although I think if anything, I would make a quite intelligent bot in Java.
@Mat'sMug B) It's PCG.
 
Oh ye @SimonAndréForsberg, I had a subtle bug feature in my dashboard program that managed it to use 1GB RAM by having 3000 live threads
2
Well the max heap size was 1GB RAM, but it was using max 250MB, then a big garbage collection and it grew again :D
 
@skiwi I crashed a server once by forgetting to close a process I spawned as part of a cron job
 
@skiwi Congratulations. I saw you pinged me earlier about JavaFX Memory issues, was it related to that? Luckily, I have not done any Tablestuff in FX yet
 
8:31 PM
@MattGiltaji That... got executed every second?
@SimonAndréForsberg Yep... I created a ScheduledExecutorService for every row being inserted in a table, and scheduled a single process to update the value
 
every 15 min, but the process used about 100-200 MB RAM every time
 
And I forgot to make it stop
 
Hey, there's no such thing as too many threads
just buy more RAM
 
@JeroenVannevel There's a limit
 
I started flagging the crap questions on SO
It makes me feel like I make a difference
Considering how fast they are marked helpful I can only assume it attracts more people to beat up the question
 
8:39 PM
@JeroenVannevel I've flagged so many non-answers. It's like an assembly line of crap.
 
@Jamal I'm at 3344 question/answer flags right now
 
@JeroenVannevel is there a badge for that?
 
@JeroenVannevel 4467 for me. I need to work harder.
 
@Mat'sMug Why do I get a feeling that your last name starts with "G"?
 
:)
 
8:41 PM
I take that as, "Yes, it's you who found me on Facebook"
 
I'm not that hard to find, am I? :)
 
It's not very impressive though
 
@SimonAndréForsberg Not really (invisible stalker!)
@JeroenVannevel hehe, go make a meta.SE post!
 
@Jamal What's the declined/helpful ratio?
 
8:42 PM
@Mat'sMug Where's the Mug? I don't see a Mug? I expected to see a Mug. I DEMAND A MUG!!
 
lol
 
I want to be an expert in Ragdoll Development.
 
@skiwi It's quite on purpose actually. I'm happy with who I am and I see no reason to hide me :)
 
@JeroenVannevel I only have 34 declined and 29 disputed. I still have 168 close flags pending.
 
(looking for mug...)
 
8:44 PM
@SimonAndréForsberg I bet you can also easily find me... except that I'm not skiwi there!
And that I still need a new profile picture...
 
@Jamal Heh. 24 declined an 597 disputed here.
I flagged a huge amount as invalid
back in the days
 
@skiwi lol, yeah... if I only remembered your last name... Frank something something...
 
@Jamal LOL 168 pending
 
That's a huge pending load though
 
@SimonAndréForsberg It's in some of my CR questions
 
8:45 PM
I had mine from 2 months ago approved yesterday but that was the longest ever
 
@skiwi Flagging to close really sucks. :-/ Those flags will be waiting as long as the close queue remains populated.
 
I think I crashed Facebook by searching on my name. I've got a white page now.
(By showing more results)
 
-2
Q: images in HTML: getting the image url

sometechyguy01let me guess, I am going to get a load of messages along the lines of 'this question is stupid, something more hard'. I am stumped. I can't get a HTML image to display from the internet OR my hard drive (this isn't going to be hosted on a server so I don't need to find it of the web). I think my ...

 
@Jamal use the force, view the source
 
Where is my auto-commenting script!? It's gone!!
 
8:49 PM
Do I get this right? You look at the last turn and if less than 50% are "good" votes you side with "good" else with evil? (Out of curiosity: Do you prefer cryptic variable names or is it an accident?) — Angelo Neuschitzer Jul 17 at 8:10
 
It's cool that you're 12 years old... But I'm not gonna care!
 
@skiwi I bet you find me faster.
 
@skiwi i thought you had to be 13 to post on SE
some legal thing
 
@SimonAndréForsberg That's because I've already found you.
lol...
> Waarom heb ik niet genomen opwaarts mijn adem uit de kelder tot nu!? (Vertaald door Bing)
 
@skiwi
@ckuhn203 Ugh, that one needs a review.
2
 
8:50 PM
@MattGiltaji You do.
 
translating it again via google translate... You said this?
> Why I did not take my breath up from the basement up to now?
 
-5
Q: images in HTML: getting the image url

sometechyguy01let me guess, I am going to get a load of messages along the lines of 'this question is stupid, something more hard, this has been asked before'. I am stumped. I can't get a HTML image to display from the internet OR my hard drive (this isn't going to be hosted on a server so I don't need to find...

 
Is this true?
Why would they ever do that?
 
@JeroenVannevel What?! I need to take a look at that...
Might have to do with boxing and ugly stuff and it suddenly being a long
But I've got no clue what he is doing
 
so int x = -1 would become a long/double?
 
Ah
No I get it
let's see if I can nail an answer in there in time
 
Next year though ;) — Mat's Mug 5 secs ago
 
How am I supposed to know the value of 2^31
by heart
Oh wait 32-bit goes to 3,2GB or something
 
@skiwi 2147483648, what else?
 
while(x < 30) { Console.WriteLine("x: " + x * 2); }
Faster than looking it up!
 
8:57 PM
I've been knowing that number by heart for about... 14 years now.
Then again, I also know 40 decimals in PI by heart...
 
works for every value
 
@SimonAndréForsberg TS!
 
(3.141592653589793238462648327950288419716993 if you're wondering)
 
public class UIntTest {
    private static void test() {
        int unsignedInt1 = Integer.parseUnsignedInt("2147483648");   //2^31
        int unsignedInt2 = Integer.parseUnsignedInt("2147483649");   //2^31 + 1
        if (Integer.compareUnsigned(unsignedInt1, unsignedInt2) < 0) {
            System.out.println("correct");
        }
        else {
            System.out.println("incorrect");
        }
    }

    public static void main(String[] args) {
        test();
    }
}
 
Hmm, I'm not sure that what I just posted is correct...
 
8:59 PM
@JeroenVannevel It does something that people have been doing for a long time, but now provides it within the Integer class.
Is compare and divide enough to do everything?
 
@skiwi So basically the idea of an int's range is abstracted and it changes depending on what method you use from the Integer class and it defaults to a signed integer as has always been the case?
Aka: a few helper methods to use it as if it's unsigned?
 
@JeroenVannevel Yeah... until Java 9 or 10 hits
yep
 
I got a few numbers wrong in PI actually. Although I think I'm quite happy about that.
 
Java Valhalla will change everything... it'll change the meaning of life!
 
talk about convoluted
It just makes me love C# even more
uint, no hassle
 
9:02 PM
With value types we're so gonna get all of those back
 
@skiwi To 43? meaningOfLife++; ?
 
I did hear there were talks of a very shallow wrapper for the int primitive...
 
NOT MORE WRAPPEEEERS
 
So there's possibly tentatively maybe sometime going to be int, Int, Integer
 
I seriously dislike those stupid object wrappers for the primitive types
 
9:03 PM
Does C# have them as well?
 
nope
C# is evolved and sophisticated
we have aliases
 
Pfft
 
int = Int32, you can use both
it's so much nicer
 
@JeroenVannevel I hum the rocky theme when I read about autoboxing
 
String? Hell no, string!
 
9:04 PM
@JeroenVannevel I have to say that I agree with you about those Java types. There's a lot of things I like about Java but int vs Integer is not one of them.
@JeroenVannevel Class names should start with an uppercase character!!
 
I'm unsure how they'll handle it ultimately though
 
string has privileges in my world
 
But structs are finally coming to Java!
well, they're called value types now
but I don't see the difference vs a struct
 
Weren't they always called value types in Java?
 
@JeroenVannevel They've never been here yet
I think
 
9:06 PM
sure they are, int and long are value types
that's why you have Integer and Long wrapper in the first place
 
hmm you could say so, but those are generally called primitives I think
 
to make it a reference type
oh
 
Say C++ also still differentiates between primitives and structs, right?
 
is there a difference?
> Programming languages that distinguish between value types and reference types typically offer a mechanism, called boxing, to wrap some or all of their value types in reference types. This permits the use of value types in contexts expecting reference types. The converse process (to unwrap the value type) is known as unboxing.
In computer science, the term value type is commonly used to refer to one of two kinds of data types: Types of values or Types of objects with deep copy semantics. == Types of values == Elements of Programming defines a value to be a sequence of bits, called datum, together with its interpretation. A value type, then, is a correspondence between a set of data and a set of abstract or concrete entities sharing characteristic attributes. The set of entities is sometimes called a species. For example, a value type—call it small_int_value— can establish the correspondence between a sequence of 16 bits...
Probably a bit of both
 
I see
Fun part is that for value types to work (and hence primitives) you'll need to define interface List<any T> { }, and the whole JDK is going to get redefined like that most likely
but any 3rd party libraries will not get redefined, so will still not accept primitives
I'm not exactly sure if that is how they are going to do it, because <any T> does not allow a null value, and say a Map<K, V> allows null-values
 
9:13 PM
Sounds like a restart with a modern framework is in order
Java++
 
I'd so wish they'd make a new language that is basically Java - bad stuff + good stuff
but ain't gonna happen
At least, they won't drop Java support
 
(like ever)
@JeroenVannevel "Huh? Why am I reading this?" Oh...
 
well that was fast!
 
You sneaky bastard, trying to get me to switch to C#!
5
 
9:15 PM
> deleted by Community♦ 6 mins ago
 
C# is basically a revamped version of Java but they added in so much sweet stuff and took out all the lame stuff
 
@JeroenVannevel This is where @Donald.McLean would come in and simply say "Scala". "Scala has all the advantages of Java but fewer of the disadvantages."
 
@SimonAndréForsberg I was exactly thinking that.
 
although they forgot enums. I could use some better enums in C#
 
Why don't we take C# + Java + new projects and make the Uber-language?
 
9:16 PM
@JeroenVannevel what's missing to C# enums?
 
@JeroenVannevel And yet C# doesn't support methods in enums!
 
@JeroenVannevel cross-platform support would be the lame stuff then ... ;-) ?
 
@Mat'sMug Java has methods, constructors, extra fields per enum value
 
Monkey 1 - C# 0
 
C# has.. An integer representation
 
9:17 PM
can't one write extension methods to extend an enum type?
 
Java 8 has streams!
 
@skiwi .net 1.0 has streams...
 
@rolfl Pffrt, I don't develop for inferior OS's
 
@Mat'sMug I'm not sure if that's the streams I'm talking about.
 
@skiwi C# 4 has LINQ
 
9:18 PM
@JeroenVannevel ugh, ;)
 
@JeroenVannevel more inferior than windows?
 
@JeroenVannevel Honest question, isn't the LINQ API harder to work with as needed?
 
@rolfl Windows is love, Windows is life
 
how would you map a list of objects to a list of their string representation?
 
@skiwi I can't say it is, but then again I have no experience with Java streams. It is very english-like coding
 
9:19 PM
language wars are boring
 
list.Select(x => x.ToString());
 
@rolfl They're better as real wars
 
@rolfl You're right, let's bring out the tabs vs. spaces instead!
 
where x is a representation of "current object in the iteration"
 
I'm out of stars so long already :/
 
9:20 PM
@skiwi I found LINQ to be a lot easier to work with than Java 8 streams actually.
 
@SimonAndréForsberg Oh, my life's a lie now, must switch to C# then!
 
@skiwi I'll take that as a public admission that C# is the moon and stars and all that is holy
 
@JeroenVannevel list.stream().map(x -> x.toString())
 
@SimonAndréForsberg i.e. linq is simpler ;)
 
@SimonAndréForsberg Mhhhm, that map doesn't make such sense. You're not really mapping anything, are you? You're selecting data
 
9:22 PM
You're lazy and not converting it back... though I accidentally didn't explicitly tell that
 
@JeroenVannevel You're converting it from a List<Whatever> to a Stream<String>
 
list.stream()
    .map(Object::toString)
    .collect(Collectors.toList());
I think a map is logical
Selecting seems more like filter to me
 
@SimonAndréForsberg That would assume that I replace the original list
But I don't
 
it's actually projecting
 
I only select the data and create a new collection with it
 
9:23 PM
.Select makes a projection of the data.
 
@JeroenVannevel A Stream<String> has nothing to do anymore with the original List<String>, apart from that it selects data 1:1 from the original list
 
C# is a perfectly fine language to use, but personally I feel that Java has so many more tools (and you don't even have to pay for them!), it has better multi-platform support and is also a perfectly fine language to use :)
 
I guess both ways around do make some sense.
 
@skiwi selecting is an action performed on all elements, filtering indicates a subset
 
@JeroenVannevel Doesn't .Select return IEnumerable ?
 
9:24 PM
list.Select(x => x.ToString()) takes an IEnumerable<T> and projects it to an IEnumerable<string>
 
One of the biggest reasons to not switch would be that every interface is prepended with an ugly I...
@Mat'sMug So the conversion gets done there immediately? not lazy as a stream then?
 
@SimonAndréForsberg it does
 
And I should be am going off now, TTGTB
 
@skiwi IEnumerable is lazy.
 
@skiwi Select does it
 
9:25 PM
@SimonAndréForsberg Ah, that's good then
 
@skiwi There is no conversion.. You're simply retrieving all data. And LINQ uses deferred execution so it's not actually executed until you iterate over it
 
C# does has the lovely yield keyword. I'm a big fan about that one.
 
Just waiting until someone comes here and says "PHP is best!" to end the language war his life.
3
@SimonAndréForsberg Same here
 
list.Select(x => new { Foo = x.ToString() }) returns an IEnumerable<AnonymousType>
 
I must say that async is probably my favorite language feature
 
9:27 PM
I need more async in my life
 
you take a day to read up on it and it'll change your life
 
Hey there all!
 
I must say that I'm not entirely sure how async works in C#. And what it's correspondence would be in Java.
 
await DoLaundryAsync; await DoDishesAsync; await CleanupLivingRoomAsync;
 
away Huh?;
Does it wait for another process/thread to finish?
 
9:28 PM
@SimonAndréForsberg It's fairly straightforward: you mark your method as async and give it either Task (void) or Task<T> (T) as return type and then you can await other asynchronous calls inside that method
 
Feels like it's a matter of object.wait(); and object.notifyAll();...
 
this flowchart explains it very well actually: msdn.microsoft.com/en-us/library/hh191443.aspx
 
2
Q: Passing Row Index of TableViewCell (custom) to another view controller

WhoamiI have been trying to achieve the below requirements to get them working. Am I doing it the right way? We have a table with customised Cell (say: firstViewController) Customised Cell has a button, click event in this button, and carries row index value to another view controller. In this view...

off topic
 
Actually, re-reading that flowchart makes me think that I might not be using async-await optimally
should I place my await instructions as late as possible and use an intermediate Task<T> variable as soon as possible?
It seems to make more sense than what I do now: await SomeMethod();
 
I need to play with that. Badly.
 
9:33 PM
Since that basically halts execution as well
 
@nhgrif By taking a quick look at it it seems like it might have enough context to be reviewed? Especially as it already has two answers?
 
- (IBAction)btnSubmitPressed:(id)sender {

     NextViewController *sVC = [[NextViewController alloc]     initWithRecIndex:@"NextViewController" bundle:nil Index:self.iRecordIndex];

  // Pushing NextViewController to NavigationViewController.
}
That's sample code.
You want me to review that?
Here's my review: btnSubmitPressed: method does absolutely nothing beyond waste execution time and should be completely eliminated.
 
heck, why not?
 
@JeroenVannevel Can multiple methods/threads await the same task? (I guess "yes", and if so - is it often used?)
 
@SimonAndréForsberg Honestly I've never needed to use that so I can't say with certainty
I suppose it should be possible, yes
but it seems like a rather strange situation to me
 
9:39 PM
Feels like Task<T> is a Java Future<T>, and await is future.get();
 
Moreover, Simon, a CR post with only method names and their arguments, simply the method headers... that has reviewable content, as we often talk about how we name methods and their parameters in our reviews. But the fact that the method bodies are missing make the question off-topic, does it not?
 
ah, so that's what Future<T> is!
 
@JeroenVannevel Yes, I'm actually not even sure if multiple threads in Java could call future.get, but I think it would be possible, and I also think that something would have been done wrong if it's done that way.
 
My understanding was that containing some reviewable content is not enough to make a question on-topic.
 
I find Task<T> much easier to grasp
 
9:41 PM
@SimonAndréForsberg Yeah, you'd have to make a pretty exotic setup since the method doesn't finish until its inner awaits are finished
 
@nhgrif My understanding is that if it contains mostly reviewable content then it's on-topic. I mean, some methods might have been provided only for context but are intended to be "outside the scope of review"
@Mat'sMug Having problems grasping the Future, huh?
@Mat'sMug You should be happy that there's no Eternity<T> or Infinite<T>
 
But what's the point in including any part of the method body? The fact that the method is called on Class B from Class A should be enough context to know that Class B has that method, should it not?
Consider this question: codereview.stackexchange.com/questions/57795/… There's no detail whatsoever provided about his TFHppleElement class yet it's used in the code.
 
0
A: Did you like my product?

PhrancisNaming You should name your aliases in such a way that looking at them tells you something about their meaning. p and pm tell nothing to the next programmer who will have to maintain your code. It's better to type a few extra letters and add clarity, like prod and prMedia. Using SELECT * SELEC...

 
@SimonAndréForsberg I am!
 
And the question is reviewable. Nothing was provided about the TFHppleElement class because it's not what he wants reviewed and including any part of it would distract from what he wants reviewed.
 
9:45 PM
@nhgrif So you're saying that it would be better to leave the method out entirely?
 
In this question codereview.stackexchange.com/questions/58061/… by including part of his StudentCell class, he has marked it as something he wants reviewed. By not including it in its entirity, specifically an incomplete method body with comments in place of code, he has made his question off-topic.
Either he needs to include the actual code or eliminate that class from the question, depending on whether he wants that class reviewed or not.
As it stands, it's just a distraction.
But it seems like he needs to actually include the code because he's asking about how he's presenting a view controller, and the cell itself seems to be what's presenting it (despite him not actually including the line of code which does so).
This method here is also an incomplete implementation with comments where code should be:
-(void) viewWillAppear:(BOOL)animated
{
    //Get FistViewController.   say  ==> fvc.

    NSMutableArray *mRec = [fvc MasterRecords];
    NSMutableDictionary *mDict = [mRec objectAtIndex:self.iRecordIndex];

    NSLog (@" value1 is %@ ", [mDict valueForKey:@"value1"]);
    NSLog (@" value2 is %@ ", [mDict valueForKey:@"value2"]);

   // Using value1, and value2 to display MKMapView.
}
And in fact, that method wouldn't even compile as is, as it is referencing fvc which his comment indicates we should presume it to be a local variable that he's somehow fetched.
 
@nhgrif But is a distraction enough to make it off-topic?
 
It's certainly not declared in the @interface section, nor has he included it in the top part of the @implementation that allows you to declare non-property instance variables.
 
You've convinced me, @nhgrif. VTC'd.
Btw, I think you might have chosen the wrong off-topic reason... someone VTC'd for "must include the code to be reviewed"
 
Also actually... he makes this comment just before the code:
Pseudo Code: (pasted only necessary code)
He himself says that the code posted is "Pseudo Code"
Which is off-topic.
I'm confused! What questions are on-topic for this site?
Simply ask yourself the following questions. To be on-topic the answer must be "yes" to all questions:

Does my question contain embedded code? (a link with the embedded code is still okay)
Did I write that code myself?
**Is it actual code from a project rather than pseudo-code or example code?**
Do I want the code to be good code? (i.e. not code-golfing, obfuscation, or similar)
To the best of my knowledge, does the code work?
Do I want feedback about any or all facets of the code?
 
9:52 PM
Yeah, that was a bit badly named... I don't see anything pseudoish about it. It's code, it's just not all the code.
 
It's not what real pseudo-code is, but the point he's making is that this isn't actually his real code.
 
As I used to write on Stack Overflow: "Is the above code your code, all your code, exactly your code and nothing but your code, so help you.... code?"
 
lol
 
raise your right hand. is the above code your code, all your code, exactly your code and nothing but your code? say "I swear".
 
And place your other hand on your keyboard.
 
9:55 PM
It was a very useful comment on some Stack Overflow questions...
 
@Phrancis I know SELECT * is bad either way, but I thought the primary reason was because the table columns could change. If you need all 10 columns from a 10 column table, is SELECT * truly less efficient then listing out the 10 specific columns?
 
^^ that is also true
Both reasons make it bad practice
Feel free to edit it into my answer
 
Did you see the question?
 
But yeah if you need all 10 then select * is fine
 

« first day (447 days earlier)      last day (3573 days later) »