« first day (341 days earlier)      last day (3676 days later) » 

12:00 AM
@Jamal It's not like you didn't get my upvote for the one missed point though ;)
 
@syb0rg True. Sometimes I leave out something minor and think, "maybe someone will address this?"
 
@Jamal I usually hope the same thing too, but then no one else ever answers after me (usually).
Probably because I try to blanket everything.
 
damn, my Internet connection has been flaky recently
 
Okay, so... now I feel like I need to write my own logging macro for Objective-C...
 
@Mat'sMug yeah, like we have not seen you on Chat all day ..... huh?
 
12:05 AM
yeah, I'm being more.. careful these days at work. Monday morning wasn't pretty.
 
Ouch, don't get in trouble over CR.
I figured it was just the recent QC Politics .... ;-)
 
lol
 
I guess Quebec wants us to pay their bills still, huh?
 
...but all we're interested today is creating a bunch of simple logging functions so we can distinguish between debug messages, errors, warnings, natural disasters, etc...
heh
 
@rolfl yeah, what a shame. I'm happy with my vote though. it's all that matters.
 
12:09 AM
Hey you have one .... (a vote) ... I know some who don't.
Out of interest, is this true?
> The Liberals took 70 seats in the 125 seat National Assembly
 
yeah
 
Does Quebec really call it "the National Assembly"
 
that's the name. Actually "Assemblée Nationale"
 
A little bit overstated you think?
 
there's History behind that.
 
12:10 AM
Does that have a French-English translation that could be interpreted as 'provincial' ...
 
nope
 
Well, I'm a bloody immigrant, so I missed my history lessons on Canada. ;-)
And the canada-entrance-exam (there is one) was rather light on QC history ;-)
 
no kidding
 
Anyway ... moving on.... England is the only country in the world that does not have any form of Government. ... ;-)
 
So, in the fall, my programming teacher (who also teaches introductory level classes) asked for volunteer email address to help tutor students in his introductory classes. I offered mine. At one point, a student emailed me, I replied, and then never heard back.
At the end of the semester, I told my teacher he could continue to give my email to his students. Got an email a few days ago, replied pretty quickly, and so far, no response...
 
12:15 AM
At least here you get an upvote ... maybe ;-)
 
The thing is, I haven't even helped anyone.
 
I should do that.
 
The first email is "hey, Mr. Baker said you could help tutor me, can you?" basically, and I reply "Yes." basically... and then never hear back.
 
(I basically do similar things here anyway).
 
Is a ternary operation more efficient than an exactly equivalent if else block?
 
12:22 AM
I would be very, very surprised if those don't generate the same instructions when compiled.
 
I'm with Corbin on that one. it's just syntactic sugar.
 
Think about how if/else are implemented and think about how a ternary is implemented. They're the exact same under the hood (I think -- I've never verified it).
 
So, I'm not that stubborn for only using ternary when I'm inlining something or saving a variable, etc.
 
it's possible in less trivial situations that it could be different, I bet
 
Or, when I can use Objective-C's nicety of omitting the true condition
For example....
 
12:25 AM
can't think of a situation off the top of my head, but.... yeah... :p
 
NSString *str = self.myString ?: kSomeConstantIfSelfMyStringIsNil;
Is this case, self.myString is only called once, where it'd be called twice in an if (self.myString) { str = self.MyString; } else ...
 
The more I think about it, I bet ternary conditions truly are just syntactic sugar. I might have to verify that later. The only difference is that a if/else introduces a new scope and a ternary doesn't. In any situation where a ternary is being used though, the if/else equivlent wouldn't actually be using the scope.
Hrmm, that's a good point
Surely the compiler is smart enough to recognize that it's the same thing though and just reuse the already loaded register value
 
I do like ternary in examples such as:
`NSLog(@"%@" someBool ? @"YES" : @"NO");
 
yeah
Now I'm really curious about this. Going to have to research later if ternaries are special, or if the compiler literally just pretends they're an if/else when compiling.
 
I mean, there's something special about ternaries, certainly, because I can't do an if else inside NSLog, for example.
 
12:32 AM
well I just learned something today.. wow it's not just syntax sugar, at least not in C#
56
A: Ternary operator is twice as slow as an if-else block?

Jon SkeetEDIT: All change... see below. I can't reproduce your results on the x64 CLR, but I can on x86. On x64 I can see a small difference (less than 10%) between the conditional operator and the if/else, but it's much smaller than you're seeing. I've made the following potential changes: Run in a c...

 
What the hell....
It's not just slower, it's significantly slower in C#
 
I gotta say I'm totally WTF'd right now.
 
Yeah
Looks like I'm going to have to look into C++ later. I gotta know now.
 
0
Q: Find all root to leave paths and add them

bazangMost of you already know me, please be brutal, and treat this code as if it was written at a top tech interview company. Question: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example: Given the below binary tree and sum = 22, ...

 
12:50 AM
Done.
0
A: Code Review Blog - Phase 2 - Define the Scope

Mat's MugAll of the Above. Why restrict it to only one topic? Have a blog post about the evolution of Code Review, and the next one about Code Review itself, or when someone's inspiration pushes them to address language-specific common review issues, if it's good content it's content that we want, even i...

 
Well, that works too.
Out of interest, and to cnfirm, you're enthusiastic about the blog?
Like, you're willing to shepherd it?
 
hey all
 
Hey @Yuushi
 
@rolfl I wouldn't mind, like I said I like writing stuff.
 
12:57 AM
Well, it's the sort of thing i can do at a push (writing), but the social logistics of managing people/timing/and coercing folk to do things is often something I suck at.
I see the value.... (and I believe it is a great idea)
 
.... ..but?
 
lol.... this answer...
55
A: What are best practices that you use when writing Objective-C and Cocoa?

Chris HansonDon't write Objective-C as if it were Java/C#/C++/etc. I once saw a team used to writing Java EE web applications try to write a Cocoa desktop application. As if it was a Java EE web application. There was a lot of AbstractFooFactory and FooFactory and IFoo and Foo flying around when all they ...

 
but it will likely wallow and putrify if I am responsible for keeping the momentum going.
 
LOL sorry had to star that!
ok unstarred
at what frequency are we expecting a post?
 
once a month?
 
1:01 AM
that was my thought as well
 
Morwenn is keen as a bean too.
 
I'm not unstarring that one ;)
 
I wouldn't mind writing something if given the chance / I can think of something worth saying
 
Part of my thinking is guaging whether I should just go ahead and get phase 3 and 4 posted as well.
I think I should.
 
so, @Morwenn, @Yuushi, @rolfl and I writing just one post makes it 4 months.
 
1:04 AM
I could do an occasional Objective-C post. Though ObjC questions aren't posted frequently enough to warrant a very regular ObjC blog entry.
 
I am not particularly concerned about finding people to write content..... I think that has 'traction'.
 
add to that the drafts people will send the "blog coordination committee" and we'll actually have to shelf posts.
 
With that said though, I think I've read every Objective-C question and answer on this site...
 
What's more a problem is that there needs to be a 'committee' of sorts to keep things going, and on track.
 
that can be the chatroom regulars, no?
 
1:06 AM
I am not fussed about who it is, but it just needs somefew to take ownership.
A lot of beta sites have started a site blog, and it has festered, and died.
 
I think I can drive. To me a blog is just an extension of meta ;)
 
probably need a better idea of what sort of things need to be done
 
although I never blogged before
I think the "what" should be on a "per-post" basis, with a general direction.
 
> We’ll consider your blog to be in a beta stage initially. Running a blog isn’t a one-time effort. We want to see continued contributions and interest in the blog as time proceeds. We want to see that you’re promoting the blog, making use of the community promotion ads if they are enabled on your site. We want to see that people from the community are interested in and reading the blog.
 
well, potentially each post should have an editor or just someone to check it for basic grammatical / spelling mistakes
 
1:10 AM
I have not consulted the other mods .... huh, but this idea is gathering its own momentum. I think that's great.
By the way, there is one down-vote on the one phase-2 meta answer.
 
I don't see it
oh there it is
I guess that downvote means "keep that for beta-progress meta-tag", on Meta.CR? — Mat's Mug 13 secs ago
 
I cannot down-vote my own answer :( I don't believe Code Review blog has the 'authority' to blog about specific language best practices. Blogs like that are available all over the place, and by people who are far more authoritative than a review community, and we would just add noise. — rolfl ♦ 1 hour ago
I don't think this is specifically about best-practice necessarily.
It could simply be about something specific to the website that is common for a specific language.
For example, both here and on StackOverflow, people posting questions that need to be tagged Objective-C end up only tagging them as iOS, and while the latter might be appropriate, if it has Objective-C in it, you can't leave out the former.
Just as an example of "language specific common review issues" that have nothing to do with best-practice.
 
@Yuushi I agree, I think all blog posts should be ...peer reviewed ;)
 
in Stack Exchange Community Blogs, 17 secs ago, by rolfl
Code Review is in the process of preparing a request for a Site-blog for Code Review.
before we get too far down this process, are there things we should be aware of that will be 'show-stoppers', etc. ? (like we are not a graduated site yet....)
 
oh darn, are beta sites excluded?
 
1:16 AM
I don't know.
 
heh, that'd be a bit of a show stopper if it were the case...
 
The room was frozen for weeks.... it may take a whil.e
 
if so, we have to update the "advanges of graduation" post.
 
@Jamal inline has no use in terms of source code inlining. But it used by the linker if there are multiple definitions.
 
We can get Loki to write about C++ ;-)
 
1:26 AM
23
A: When is "inline" ineffective? (in C)

Richardinline does two things: gives you an exemption from the "one definition rule" (see below). This always applies. Gives the compiler a hint to avoid a function call. The compiler is free to ignore this. #1 Can be very useful (e.g. put definition in header if short) even if #2 is disabled. In p...

 
@LokiAstari So is it still not needed here?
 
Yes it is needed (with a very small number of exceptions). This is because template function definitions have to be defined in the header files (because the definition is needed in each translation unit). So you need the inline to get around the One definition Rule (otherwise there is a definition in each translation unit) otherwise the linker will barf.
 
Ah, I see.
 
0
Q: Code Review Blog - Phase 3 - Recruit contributors

rolflAnticipating ongoing interest, adding phase 3 question: Who will write entries for the blog? Starting a blog is a bit like going through the buffet line. Be realistic – don’t let your eyes be bigger than your stomach. Think seriously about if and how often you will be able to contribute a blo...

 
@Mat'sMug @Morwenn @Yuushi @All - this is about as far as I push the process proactively until the blog is in place. At this point feel free ask me to facilitate in any way I can.
 
1:41 AM
@rolfl confirming that beta sites can have that would be a very, very good start ;)
 
I don't know if I'm quite ready to commit in answer form, but I would be willing to write as many articles as I could think of about relatively basic things and common mistakes/design errors. I've developed very mixed feelings lately about the reference questions I proposed, and a blog post or two would be a good excuse for me to talk about a few common mistakes without having to wait for the perfect context to come up.
Then again, there seems to be mixed feelings on if that's even on topic based on phase 2... lol
 
For the record, I've never written a blog before.
 
ditto
 
I have written a couple internal at IBM. It takes me a lot of prep, and research to ensure things are right, and write.
I would commit to a couple a year, but that is about it.... (I expect it would take me a week of evenings to do to my satisfaction).
 
2:05 AM
I would probably only have 2 or 3 to contribute, and depending on work/school, it could take 2-4 weeks each :/. I wouldn't want to say anything without very thoroughly backing it up, both in terms of explanation and finding good sources :/.
 
@bazang - come join us in the 2nd Monitor chat roomrolfl ♦ 53 secs ago
 
@rolfl Why didn't you just use the super ping?
 
Reserved for moderator things.
This is to discuss the finer details of code complexity
 
Hello World.
 
I'm on my phone at a bar, so please forgive any idiocy! :)
 
2:18 AM
Hello, and welcome!
 
@ShahrukhKhan Hello
 
hi!
 
Hey @DavidHarkness -
 
@DavidHarkness lol
 
@DavidHarkness Phone chat sucks too.
 
2:19 AM
Boring bar, eh?
 
@syb0rg No doubt. This is pretty horrid.
 
@DavidHarkness and I might very well be co-workers soon ;)
 
I see you have discovered the secret Rep-generator machine ;-)
 
@200_success Just waiting for the cool women to show up. :)
 
Get yourself a few beers then ;-)
 
2:22 AM
@rolfl Done! Guess I'll need to start bringing a tablet instead for maximum geekdom.
 
Somebody has already registered the codereview.se domain (since 2011-06-01), which is about half a year after this site launched.
 
0
Q: Gathering IP and workstation info; does it belong in a state class?

p.campbellI'm writing an enterprisey utility that collects Exception info and writes to the Windows Event Log, sends an email, etc. This util class will be used by all apps: web, BizTalk, Windows Services, etc. Should this state class (please what's the phrase I'm looking for [like DTO]?) know how to det...

 
that's annoying....
 
We probably should have spent the $7 when launching the site.
 
Yeah.... lol
 
2:25 AM
There's the codereview.sx option.
Or cr.se.
 
There's always linkedlists.se if all else fails...
8
 
will we even get our own domain? won't it just be codereview.stackexchange.com?
 
A redirect would be handy.
 
Popular sites get domains... so probably not for a while. How about CoRe.se?
Wow, chat is killing my battery. 10% down since joining! Gotta jet so I still have music on the walk home. Ciao!
 
@200_success Well there is a new review new-gtld-list tld being proposed. you could register the domain code and thus get code.review L-)
 
2:34 AM
The new TLDs are nuts.
AOL keywords all over again.
 
network problems?
@JerryCoffin, and what do you think about this:
6
Q: First socket class

user3277743I want my socket class to be reviewed, including recommendations and optimizations. Sokect.hpp class Socket { protected: friend class SocketServer; Socket(SOCKET s); Socket(); SOCKET s_; sockaddr_in sa_; int* count_; private: ...

Huh .... 500 questions on meta.
2
 
so I just started reading about the OpenSSL vulnerability...
 
And, did it make you more, or less worried?
@JerryCoffin - apparently your current answers do not contain enough detail.
 
2:51 AM
it did make me facepalm a bit
 
on-topic?
0
Q: Gathering IP and workstation info; does it belong in a state class?

p.campbellI'm writing an enterprisey utility that collects Exception info and writes to the Windows Event Log, sends an email, etc. This util class will be used by all apps: web, BizTalk, Windows Services, etc. Should this state class (please what's the phrase I'm looking for [like DTO]?) know how to det...

> This code was written by hand from memory, and presented for simplicity, trying to illustrate the concept.
 
Does deleting that footnote make it on-topic?
 
maybe. but the code block won't compile as is. (the part before the class belongs in another method)
and...
Is the class really called Exception? — Mat's Mug 18 secs ago
 
in Stack Exchange Community Blogs, 1 min ago, by Grace Note
I'm about to head to bed, since it's 23:00, but I can look at this in the morning.
 
@rolfl I'm not sure, but I think that translates to: "You didn't provide corrected code".
 
3:01 AM
Different person posting the bounty than asked the questoin.
 
It's pretty concerning when someone is writing a socket library and doesn't know what buffering is :/
 
@rolfl I don't think that changes my guess.
 
@Mat'sMug - I'll close it with a message.... be a heavy-weight
 
@Corbin Don't worry, be happy! No worries, not latencies!
 
@rolfl I commented
It's pretty hard to review code that's not really the code you want reviewed. CR answers can/should address any aspect of the code, not just a concept. See our help center for all the details. I'd probably flesh out an answer expanding on why an Exception class should be derived from System.Exception and be called something meaningful, and should be thrown at one point or another when they're instantiated... but it's irrelevant if the code is just pseudo-code. — Mat's Mug 52 secs ago
 
3:04 AM
@JerryCoffin x.x
 
@rolfl the response wasn't an instant "beta sites are excluded", so this has all chances of happening :)
> Reviews don’t fit the Q&A nature of the sites (blog.stackexchange.com/2011/06/blog-overflow)
^^ isn't that ironic?
 
@Mat'sMug - context:
> Review a product Reviews don’t fit the Q&A nature of the sites
Oh, and while I remember ..... and a dedicated [private] chatroom ....
is a possibility, but the blog actually mentions using google docs, etc. and wordpress tools, which may be better.
and [private] is normally not a great option on SE
 
3:25 AM
Yay 9.5K! Thanks Santa!
 
0
Q: Scraping reviews from Google Play using JavaScript

Coder 314What I'm trying to do: Get user input for Google Play App page. e.g. https://play.google.com/store/apps/details?id=jp.scn.android Scrape 100 reviews from Google Play App and organize them into an array. My JavaScript function: function test() { var urlAdd = document.getElementById('i...

 
score of 100 and 17 answers. So close!
 
3 to go!
 
No more C zombies, so I should just wait for new ones.
 
or add a new answer to an existing question, and help the answers/question ratio :)
 
3:29 AM
3
Q: Does this simple memory pool use too much memory?

2013AskerI just wrote this pool to avoid calling malloc and free when I have some code that frequently allocates and deallocates chunks of same-sized memory. I would like to know if there are any bugs I didn't notice and what would be the best solution to achieve this goal. I'm using some small functions...

 
That, too. There will be many to look through, but I can start with and .
 
C zombie ^^^
 
@syb0rg I have seen that one, but I don't have anything specific to say about memory. Or does it not matter?
 
@Jamal - I wrote a neat SEDE query to find good candidates to add a second answer to.
 
@Jamal Ehh, he is asking "I would like to know if there are any bugs I didn't notice and what would be the best solution to achieve this goal.", so maybe.
 
3:31 AM
Darn
 
Hmm, I really want to contribute to this blog; recent activities have eaten up a lot of my time though...
 
hehe ... nothing came up with those parameters.....
@syb0rg get a girl-bot?
4
Trips to Italy?
 
@rolfl I'm working on that for my school prom event right now actually.
But I don't want to go too off-topic for this chat room now...
 
0
Q: DRY-ing the codes for controller specific javascript assets when using Turbolinks

AbednegoI started to use Turbolinks gem in my Rails 3 application project. I use //= require_tree . in my application.js When using Turbolinks, I've just realized that some javascript codes stop working. According to the Railscast page, the solution is by adding the following codes to the js file: rea...

 
3:38 AM
@JerryCoffin Looks like you need to up the ante on your answer here:
5
A: First socket class

Jerry CoffinI think you have too many different responsibilities bound up into one class. That ends up not only making that class more complex, but adding extra complexity overall as well. As a starting point, I'd have a really trivial class that does nothing but stack-based management of the WSAStartup/WSAC...

According to the bounty description - "The current answers do not contain enough detail."
 
heheheheh vuja-de .
 
	char wavFile[FILENAME_MAX];
	char flacFile[FILENAME_MAX];
	err = snprintf(wavFile, FILENAME_MAX, "%s/XXXXXXXXX.wav", getTmpDir());
	err = snprintf(wavFile, FILENAME_MAX, "%s/XXXXXXXXX.flac", getTmpDir());
	err = mkstemp(wavFile);
	err = mkstemp(flacFile);
@Yuushi or @200_success How does that look for generating a temporary file name safely?
If needed:
const char *getTmpDir (void)
{
    char *tmpdir;
    if ((tmpdir = getenv ("TEMP")) != NULL)   return tmpdir;
    if ((tmpdir = getenv ("TMP")) != NULL)    return tmpdir;
    if ((tmpdir = getenv ("TMPDIR")) != NULL) return tmpdir;

    return "/tmp";
}
 
I haven't found much, so I may just wait for new questions.
 
@syb0rg Perhaps. I'm not entirely sure how much to add though. I'm tempted to just say: "this is all a waste of time. Use Boost ASIO."
 
@JerryCoffin I would consider that part of a viable review.
 
3:44 AM
@syb0rg I'd rather getTmpDir() was only called once
 
	char wavFile[FILENAME_MAX];
	char flacFile[FILENAME_MAX];
	const char* fileRoot = getTmpDir();
	err = snprintf(wavFile, FILENAME_MAX, "%s/XXXXXXXXX.wav", fileRoot);
	err = snprintf(wavFile, FILENAME_MAX, "%s/XXXXXXXXX.flac", fileRoot);
	err = mkstemp(wavFile);
	err = mkstemp(flacFile);
@Yuushi Like so?
 
@syb0rg Yep
 
@Yuushi Do you think I should do more error checking in between the snprintf and mkstemp? Or just leave a single error handling condition after all of that?
 
@syb0rg I'd check both the mkstemp calls
are they truly meant to be temporary files?
 
@Jamal - updated the query to accept a tag name....
 
3:53 AM
:D
 
add C tag, change to 80 days since seen, and minimum user votes 2.
three candidate C quesitons,.
 
Found one! Answering...
 
@Jamal I think I know which one you went for ;)
 
:-P
Go ahead and take a guess...
 
Pleased I could help, now if you drop the min question score to 1 you get this one too:
1
Q: Hardware interrupts for Nios 2

909 NiklasThe program is behaving like expected, but I think something better can be done since I'm a novice C programmer. I suspect that the interrupt handler can use some other way of calling the hardware instead of direct memory. Can you look and tell me what can be improved? #include <stdio.h> #inclu...

fpga question?
 
4:04 AM
wow just when I thought the other answer had said everything, I notice the underscore-happy naming... first answer in 2-3 days!
and TTGTB now - 'night @all!
 
Night
 
Bye @Mat'sMug
 
0
Q: eliminate duplicates from strings

KalpeshI have written a piece of code for removing duplicated values from an string. Any suggestions for improvement ? ` public static String removeDuplicate(String s) { char [] temp = s.toCharArray(); int length =temp.length; for (int i=0;i<length;i++) { ...

 
Perhaps... he found the 2nd monitor today ;-)
 
4:19 AM
0
A: Using bucket sort to rank students based on their marks..

Jamal All of your functions are missing return types. This also tells me that this code hasn't been tested, as this cannot possibly compile. main() should return int as it should return error codes. Based on the other functions' names and the fact that they're not returning anything, I believe they...

 
@Jamal Guessed right ;)
 
@syb0rg I knew it. :-) Two answers remaining now.
 
TTGTB, good night @all!
 
Goodnight!
MathJax is awesome. :-)
 
Yeah, used it a bunch today.
3
A: Find the sum along root-to-leaf paths of a tree

rolflYou are treating res and curList as if they are Globals, and, since they are globals, there is no reason to return ret in the function at all. As a result of this, your code is not re-entrant (you can only have one method calling your pathSum at any one point in time). The right solution to thi...

 
4:33 AM
Revival! :D
 
@Jamal - go correct the spelling of Eeliminate in that recent edit, quick before 5 minutes....
1
Q: Eeliminate duplicates from strings

KalpeshI have written a piece of code for removing duplicated values from an string. Any suggestions on improvements? public static String removeDuplicate(String s) { char [] temp = s.toCharArray(); int length =temp.length; for (int i=0;i<length;i++) { for (int j = i+1; j<lengt...

 
I was too late, but I did find another typo.
Oh... I made that title typo. :-/ I've been editing too much lately...
 
2
Q: SEDE query to find users with exactly one post in a particular tag

Niall C.I'm doing some research for a meta post on Gardening.SE (where I'm a pro tempore moderator). I'm using the Stack Exchange Data Explorer (SEDE) to find information about first time users who post questions in our [identification] tag, and how they subsequently interact with the people who respond ...

 
Every time I see a Java review with hard styling specifications, I get a bit jealous. I've never worked in a language with a standard styling before. Must be nice :/. (Well, Java was my primary language ages ago, and I use Python from time to time, but... yeah)
 
@corbin I was wondering about HTML Nav Element. I will have to talk to you about it tomorrow though. I am going to bed now.
 
4:45 AM
Ah, alright :). Night
 
but thanks.
 
@Malachi - stranger!
 
@rolfl lol. I stayed home all day, I was trying to get stuff installed and set up correctly on my computer so I could debug php code from Aptana. PITA.
I still don't have it working right, but I am tired and my lady is already asleep even thought the light is still on, so I need to get going before she complains about me typing....new keyboards I tell you.
anyway later
 
A new user comes by, asking for a review on a SEDE query. I wonder if this is something we can advertise to others (coming here if someone wants their query reviewed)?
 
@Jamal - check out the TL.
 
4:51 AM
I suppose that's the kind of thing we would consider for when we do . I'm not quite sure exactly how it works, though.
 
hrm...to make more coffee, or to stop...
 
5:16 AM
The Programmer's Dilemma
 
Pimping codesparkle's latest answer:
0
A: How can I make my solution for Chef and Digits run faster?

codesparkleIssues with your code You didn't put any effort into choosing good names. Given a code challenge, either stick to the variable names used in the problem statement (n, m, ...) or, preferably, choose explicit and descriptive names such as steps, digits and indices rather than z, y, etc. Why shoul...

 
Hrmm, I just realized I forgot to update openssl on all of my servers earlier :/.
I wonder what kind of fall out will actually come from Heartbleed. Wonder if any banks priv keys were actually stolen or anything x.x
 
I think it's just another thing we can throw on the list of crap the NSA has access to now
 
Yeah. That was my first thought. There's a very good chance the NSA had collected tons of private keys over the past 2 years.
 
5:31 AM
apparently no-one likes my static_assert suggestion
 
Looks good to me.
I wouldn't do the enable_if that way btw.
It exposes it to the consumer.
Instead, I would use unfulfilled SFINAE. I guess that's just as gross in a different way though. I'm just weird about having extra template params.
 
I pretty much say if you're not using enable_if for overload resolution, you're using it wrong
but maybe that's just me
I'm writing too much Go...I need to find something fun to write in C++
@Corbin Are you still a student, out of curiosity?
 
Eh, yeah I guess so. Extra template params irk me though. Then again, most people would probably see my typedef abomination and cry.
@Yuushi Yup. Graduate a month from today :D
 
5:47 AM
Nice. I'm impressed by your depth of language knowledge, doubly so as a student :)
 
@Corbin I still have another year. :-/
 
:(
 
(but I can easily say that your knowledge, also as a student, surpasses mine)
 
@Yuushi I just have a Stack Exchange addiction. And a advanced data structures class that basically forced me to learn advanced C++ items.
And it helps that I've been a freelance web developer for 6 years, about 4 of which were steady.
 
yeah, but I don't think too many freelance web dev's pick up C++ on the side ;P
 
5:49 AM
It's shocking to me how different real world software development and academic programming are. x.x
Hah. I'm that weird freak that somehow went from PHP to C++ ;p
6
 
haha
 
@Corbin At least we have the first thing in common. :D
 
Freshman year, I wanted to test out of programming foundations I. It was a C++ class. The professor asked me what language I best knew, and when I said PHP, she basically laughed. Can't say I blame her. Most PHP devs are complete and utter shit x.x.
@Jamal hah :D
 
I believe Austin Community College has an advanced C++ class, which apparently isn't part of the CS curriculum. But considering how much the data structures there kicked my ass, I'm not feeling too good about it.
 
Interesting. I wish my uni had something like that.
I did have a professor once that would ask us random trivia at the beginning of the class about C.
 
5:55 AM
Ah, here we go:
Same instructor for that data structures class, too.
 
"Will int p[10]; *(5 + p) = 3; compile" was a bit of a "Wtf?!"
Sounds like a really interesting class
If you take it, you should encourage all of your fellow students to post on Code Review :D
 
I should. :D I have introduced one other professor to CR, and she seemed impressed.
 
:D
 
And one other has said that he has sort of heard of SO.
 
@Corbin I always like the 5[p] trick ;)
 
6:02 AM
Oh! That's what it was!
I could only remember it being some weird trick
 
yay for array to pointer decay rules in C
(not)
 
lol
 
@Yuushi - you know we have MathJax now ;-)
 
@rolfl Hrm, ok, I need to look up how different it is from LaTeX
 
\$O(n^3)\$ ... actually, let me edit your post ;-)
 
6:08 AM
ok, so slightly different
 
too late, @Jama ized.
 
I'd have edited to $O(n^{3})$
thanks :P
 
@Jamal - too many parenthesis (and ^^^ would work too)
 
@rolfl Too many parentheses in that edit?
 
Yes
In the N^3
@Yuushi - codereview.stackexchange.com/editing-help - search for Latex
 
6:11 AM
There was already an opening parenthesis before that.
 
ah, thanks
 
Oh, you're right.
TTGTB ... making edit mistakes.
 
Goodnight!
 
@rolfl night
 
Support the Code Review Blog
13
^^ pinned
Stil not happy
Bette.r
 
6:35 AM
@JerryCoffin - Congratulations on earning [badge:silver-c++] ... how does that make you feel?
 
:O
 
Only took him 3-something years since he joined CR ... ;-) slacker.
 
Off-topic and crap:
0
Q: using task parallel library and linq - unable to detect Null reference exception

user2159471One of our Console application was working fine but started failing in Production with null reference exception. We can't debug as of now because we don't have access to Production and getting obfuscated data will take some time. Meanwhile can some one help me to find where code may be breaking. ...

But I don't think it came from SO.
 
@rolfl Hmmm...if you hadn't said something, I'm not sure I'd have noticed. After ~700 badges on SO, I don't pay them a lot of attention any more.
 
... 700?!?!?!
 
6:46 AM
Thanks though--it is nice, now that you mention it.
 
I didn't even know there are 700.
 
@Corbin Total, not unique. Probably around half the total is "nice answer" badges.
 
Ah. That's still pretty crazy.
 
-2
Q: using task parallel library and linq - unable to detect Null reference exception

user2159471One of our Console application was working fine but started failing in Production with null reference exception. We can't debug as of now because we don't have access to Production and getting obfuscated data will take some time. Meanwhile can some one help me to find where code may be breaking. ...

 
I feel like @StackExchange should only post questions with positive scores.... :/
 
7:13 AM
hi all
@rolf: Why not make a meta question for each new blog entry and edit it as a community (at least to gather some talking points) and then let the "blog committee" decide which to use (one could go further and let the community write the whole entry but that could get messy)
 
0
Q: java : which is best way use value for object

mcacorner1) Create String Object & fetch value in it & use it String attrName; String attrValue; while(itr.hasNext()){ MyClass obj=itr.next(); if(obj!=null){ attrName = obj.getAttributeName(); attrValue = obj.getAttributeValu...

 
7:31 AM
^ off-topic
 
@Jamal: Why? It looks like a best practice question to me
 
It seems the OP is just asking which one is is better, and is not asking for a review. it also looks like example code.
 
Well, perhaps the added detail will be enough for somebody to write some working socket code. And now it's past by bedtime...
 
7:52 AM
2
Q: Encrypt and backup folder to email daily, when online

Tomas GreifI have a backup script which should backup a folder and send it to email. This should be done once a day. As this is on my laptop which is not online 24/7 I need to check that I am online and can send email. For this script I have an entry in crontab running every 2 hours. Because the folder is ...

 
8:12 AM
Monking
 
morning
 
8:26 AM
0
Q: Inherited code checking Struts method name

SJuan76I am working in an inherited code (as in "everybody related to it left before I arrived at the job and left no documentation") and I have noticed an strange pattern. Almost(*) each Struts (Struts 1.3.8) method that is invoked begins with a code such as public ActionForward myMethod(ActionMappin...

 
8:57 AM
monking
 
monking
 
9:21 AM
0
Q: C# Winform plugin architecture. Design and code

user40438I have been developing this plugin architecture, mostly for fun and education, its a simple Winform with some plugin logic and two plugins, i want to know if there is a better way of doing it. Form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Da...

 
9:48 AM
Hello everybody.
 
hey @Morwenn
 
I see that the blog thing advanced overnight :p
 
hello @Morwenn
 
Hey^^
 

« first day (341 days earlier)      last day (3676 days later) »