« first day (357 days earlier)      last day (3959 days later) » 

00:03
RELOAD
00:19
Yee-haaa!
00:34
So, I'm trying to figure out a way to use a comma in a #defined macro without the marco thinking the comma is an argument delimiter...
00:55
Finally figured it out!
01:15
Vyorp vyorp vyorp vyorp
lul
@nhgrif
Rubber duck debugging, rubber ducking, and the rubber duckie test are informal terms used in software engineering to refer to a method of debugging code. The name is a reference to a story in the book The Pragmatic Programmer in which a programmer would carry around a rubber duck and debug his code by forcing himself to explain it, line-by-line, to the duck. Many programmers have had the experience of explaining a programming problem to someone else, possibly even to someone who knows nothing about programming, and then hitting upon the solution in the process of explaining the problem. I...
Yeah. So I do this all the time at work.
I think I've said it before in here. I work in an office with 3 other programmers.
None of them speak Objective-C or know much about iOS development. Only one of them even has an iPhone.
But explaining problems out loud to them helps me solve the problem just by talking about it out loud.
01:31
But reading that makes me want to buy a rubber ducky and bring it to work now.
1
Q: Creating a better NSLog

nhgrifSo, generally when I write iOS code, I will start with a lot of calls to NSLog, which is a macro that with print the string you send it to the console. There's a few problems with this. First of all, whether you know it or not, you can see what's being printed to an iOS device's console even on...

Sigh. What is anyone expected to do with a comment like this:
these lines [lines addObject:[_text subStringToIndex:100]]; and _text = [_text subStringFromIndex:100]; bring me errors for some reason — Shalin Shah 3 mins ago
The REASON is because there's something wrong with them. Tell me which lines have errors but not what the error is is less helpful than telling me what the error is and not telling me what line it's on.
Not surprising, coming from SO.
01:57
0
Q: C bracket matching

FracturedRetinaI wrote this program to match square brackets as part of a Brainf**k interpreter. I'm aware that it gets caught in an infinite loop if brackets are entered like this ][. Are there any performance improvements I can make? Should I change any variable names? Are there other syntax errors that wil...

@StackExchange Ha. I wonder if someone got the idea from my own question I've edited today. :-)
02:44
Shameless plug on a slow Friday night:
0
A: Creating a better NSLog

CorbinThe easiest way to avoid the extraneous function is going to be to use a function directly rather than using a macro. You do unfortunately have to drop down to a bit of C, but luckily since ObjC integrates rather pleasantly with C, it proves to not be very painful. The only C part is the use of t...

Obj...C ... definitely slow
At least I got one question upvote today. Yeah, it's pretty slow today.
Well, it has been a crazy day, and a crazy week, and will be a crazy weekend.
Fridays are always slow. Add to that that ObjC is just about the slowest language on CR other than Haskell, and... yeah...
How's the good folk in CR doing?
02:52
Not sure if I should be included in "good folk," but... Pretty well. How are you?
Superb. Eating food and watching TV. Tomorrow I start procrastinating studying for finals.
Finals already? Y'all get out early. I'm jealous :(
Yeah, I made some 'pitches' at work this week... successfully .... now they want it all working last week already
Unfortunately, they only give us two whole days between the last day of lectures and the first day of finals. Two fucking days. I believe it used to be a week.
so... finals on Monday?
02:55
Hrmm, I think the standard in America is just a long weekend between last lectures and finals. We get "Dead day" Friday off then we start Finals either Saturday or Monday depending on the semester.
@rolfl The curse of success!
yeah^^^^
it's either going to lead to a massive promotion, or a deadend..... depending on how well I execute it now.
@rolfl The first one is on the 1st, for computer systems security.
Gotta love when people hear an idea and want it tomorrow. It annoys me how quickly people think software development happens x.x. I suppose it keeps us all employed though.
Hah. Someone posted a terrible question on MSO asking why they are no longer to ask questions on SO. I have a guess...
@Jamal - that 'experiment' from a couple of days ago ....
2 days ago, by rolfl
Let me put an answer on that question.... what I would have liked to see ... ;-)
Did it prove anything?
2 days ago, by rolfl
0
A: One line way (preferably) to print 80 (or more) same characters

rolflString constants in Java are very efficient. In practice, your code is very high-performing. The issue here is not about how fast the code runs, because, essentially, it cannot be run any faster than this. If you want to have more efficient code in terms of space, then the practical thing to do ...

@Corbin Every damn day, it seems. :-/
03:02
Yeah... Know what's kind of hilarious and depressing at the same time? That "Why is StackOverflow so negative of late?" question posted yesterday is now the top voted question of all time on MSO.
@Corbin They might as well repost this on MSO since there's still going to be tons of dupes.
209
Q: What can I do when getting "We are no longer accepting questions/answers from this account"?

ArjanDo not repost the question you were about to ask until you have READ EVERYTHING WE ARE ABOUT TO TELL YOU. While trying to ask a question, one could get: We are no longer accepting questions from this account. See the Help Center to learn more. Likewise, for answers: We are no longe...

@rolfl I'm not sure. Is your answer that much better than the others?
I am not sure it really is ... which is why I am asking
It proves that shot questions get hot....
Yeah. There needs to be an ability to close MSO questions as MSE duplicates, at least until MSO gets its own footing going. It's rather confusing to new people I suppose what constitutes a network wide question and what is a site specific one. A lot of new people don't even know other sites than SO exist on the SE network.
It proves that if you mention a post in chat, it gets eyes-on
Hey Jerry
It really seems to be a case of the 1-liners being 'easy pickings'... which, I think, is why they are popular
@rolfl Well, I do prefer these shot questions over ones where five or so people (on SO) tell the OP that a semicolon is missing.
03:07
You don't have to 'understand' the code, just throw out an quick stab at an 'answer'.
I know I like the rep I got fro that question/answer.... and, it shows that people can vote on CR.
It does make me happy when a question gets really popular, even if it's mostly for other SE users. One large burst of voting is certainly better than nothing.
It just seems out-of-balance that answers like these two, are so different when it comes to votes:
http://codereview.stackexchange.com/a/36804/31503
and
http://codereview.stackexchange.com/questions/47986/one-line-way-preferably-to-print-80-or-more-same-characters/47990#47990
The first required 30 minutes, the second I did in ..... 4
I know that up-votes/reputation is not linked to the quality of the answer
And, sure as nuts, I will get some upvotes on that 1-score answer now... but....
... the point is whether I should feel like votes and effort should be related.
That happens to me all the time. It almost seems like votes received is inversely proportional to time spent preparing an answer. It might be the "omg tl;dr" effect in action.
My beef with the 1-liners is that ... it's too easy? .... draws the wrong crowd?
I think votes and effort should be related but only indirectly. Really votes should be proportional to the amount of help they provide. Ideally effort should correspond with that quite closely, but sometimes exceptions happen.
Of course though, a 1 line answer usually has a help value of 0.
03:14
Same as this one, I suppose. But I guess most were looking for something conceptual, which the top answer is.
.... and there's the +1 on the other answer....
We as a community do have a weird fetish for fundamental changes in programs. Answers along the lines of "there's a completely different approach you should have used, and now I'll explain it for 2 pages" tend to do really well if they're fleshed out well and not just "hahaha start over."
@Corbin But if many people can understand it, then they will vote for it. Here's an example.
Yeah, that's true too
Then again, I would much rather that be a problem than people voting on things they don't understand
I see a lot of PHP answers get upvoted that shouldn't be.
But for these longer answers, it may convince others that this is the ideal answer for this site, which they may not like as it takes more time (compared to shotgunning answers on SO).
03:17
^^^^ that.
This is also why I am trying not to go for a fully-comprehensive answer. Instead, I point out some things I can, and let others provide answers. More answers is a good thing.
I'd rather a community value long, well thought out answers than have a community like SO that values 2 sentence, accrue-rep-as-fast-as-possible answers. To be blunt, SO's community is complete and utter garbage, and it would ruin CR. The knowledge of CR's answers has to remain high or otherwise we're just spewing bad advice at people and causing more harm than good.
2
^^^^ that sums up my thoughts....
and it is why I worry a about 1-liners.
Which is why I tend to link to well-received SO answers at times.
It attracts the 'wrong crowd', but, am I in a position to judge/manipulate that?
03:19
1 liners can sometimes be very valuable though. For example, Java has a very well established formatting guideline, and correcting someone on that can be as simple as one or two lines.
1 liners should never become the standard though. They should ideally be very rare.
I feel that it could be a problem with seasoned SO users who are used to that. On the other hand, brand-new users will always post shit from time to time, but that's a problem for every site.
I think I have to stop worrying about this issue ... and consider them to be 'different strokes', just not for me.
@Jamal we'll just have to break them of their ways. Lays down bear trap. :D
I'm especially not going to kill dozens more C++ zombies with "STOP USING using namespace std" as the only answer.
@Corbin Eh, I suppose I can appreciate those who try to answer well, versus those who send an off-topic post to us.
Ah true. I hate the 10k+ rep users on SO who send us crap all day long.
We're not a freaking code fixing service. Why the hell would anyone think that?!?!?!?! Gah!
03:23
That's a lot of broken code which may need more eyes. You should try CR.
And that's when I have to resist breaking my computer.
Well, to be fair, many still think SO is their personal helpdesk. I always headdesk when I see someone posting something about lost FB photos. XD
@Corbin Because they're rep-whores who figure it's best to get rid of anything that doesn't seem like they can get some votes for a FGITW "answer".
@Jamal Hah. I love those. They're so... Tragic.
@JerryCoffin fgitw????
03:25
@Malachi Fastest Gun in the West.
@JerryCoffin what about a Rep Pimp?
@Malachi You must be new here ... ?
Yeah... that's definitely a problem on SO. It's amazing how addictive magical internet points are.
-2
Q: Button array C#

geekthI have this code Button[] ButtonArray = { btn1, btn2, btn3 }; for (int i = 0; i >= 3; i++) { ButtonArray[i].Text = loadData[i]; } What I try to do is that in the buttons btn1, btn2 and btn3 loads the data from loadData array in its text property When running the program it doesn't load a...

03:26
@rolfl very new
I only had one glass of wine so far I swear, even if it was bigger glass
3
@Malachi What about them?
sounded like you were dissing on Rep whores
@Malachi Hmm...wine. What an excellent idea.
@JerryCoffin I just wanted to make sure that I didn't need to get my pimp gloves out and pimp slap you for talking smack about my answers
anyone over here help me out?
in Root Access, 3 mins ago, by Malachi
someone told me about a website where I can scan my system so that it tells me what Ram I can install and how much ram my computer can handle and stuff, anything come to mind? I can remember the name of the site
Well, I did not mean to divert the silence of CR Chat down the drains of SO Bashing .... ;-) All I wanted to know was whether people thought 1-liner questions were OK.
03:28
Oh god. Give it an hour and we're all gonna be drunkenly bashing away at our keyboards about "the good old days" when "people really cared, you know?"
@Malachi A website shouldn't be able to do that x.x. CPU-Z can though. Or Speccy. Or any software like that.
@Malachi It depends. There have been some self-admitted rep-whores who knew their stuff well enough that I respected them a great deal. For that matter, it's open to argument that my rep on SO is high enough to automatically mean I must be a rep-whore. Nonetheless, when I use the term I have a few specific ideas in mind, especially people who write answers that are meant much more to garner votes than help the person asking the question.
I like to get as much rep as possible, it means that my answer is right and I have shown someone the right direction to code
and because I like being rich even though I am not
I think we're all guilty of rep whoring to some extent. I like to think of myself as a reformed rep whore. Some of my old answers make me a bit ashamed.
Which makes me wonder... can we say the ones here who pimp answers aren't necessarily whoring rep, but compensating for lack of voting attention from others?
sorry I need another glass of wine, and I will probably be back in the morning while I work on some websites and building my freelance profile
03:32
Hah. Everytime I pimp an answer, I feel a bit dirty. But those internet points. Those sweet, sweet internet points... And I try to only do it on answers that I feel should have gotten more attention (which makes me something potentially much worse than a rep whore...).
4
I need about $1.5k for a down payment on a motorcycle. I need one bad
^^^^ for that you need to pimp for real $$$ not internet $$$
2
@rolfl agreed
@Malachi The problem on SO (or one of the problems) is that votes only rarely go to really good answers. Votes go primarily to the first answer that isn't obviously horrible (and in at least a few cases, even to answers that are pretty obviously horrible).
3
but my rep here will help
2
A: SQL database design e-commerce

MalachiYou need to add Foreign keys that reference the Primary keys of the tables they are linked to. I don't usually do a whole lot with building the actual tables but I know that you are missing the foreign keys. in this Table: CREATE TABLE `shipping_type` ( `type_of_shipping` VARCHAR(30) NOT N...

03:34
@Malachi It could. My rep on SO is a pretty substantial part of how I got my current job.
4
@Jerry, the FGITW issue has actually been analyzed, and found to be somewhat broken.
(i.e. even when FGITW applies, it has only a short-term effect.
@JerryCoffin nice
3
A: Review of my CSS for aligning the navigation icons and text in a footer menu

Malachiyou should use a <div> where you need to separate a block of code from the rest, for positioning or for other purposes, your use of the div for the Footer section is correct, so that you can place this part of the page at the bottom, where it belongs. when you create a list item (<li>) it is a...

25
Q: How big is the Fastest Gun in the West bias?

Jon EricsonOne of the earliest phenomena noticed in Stack Overflow's voting system is the FGITW problem: the first answer is more likely to get upvotes than subsequent answers. Even if later answers are objectively better, the first answer forms a bandwagon that collects more votes than it otherwise would....

this one should have gotten more attention, I did a lot of work for it
3
A: Improve this embeding of size in Stream

MalachiI was looking into the MemoryStream and I found this Except for a MemoryStream constructed with a byte[] parameter, write operations at the end of a MemoryStream expand the MemoryStream. on MemoryStream.Write Method I would look around a little bit on the MSDN sites that I am going to lis...

@Corbin I have one now-deleted answer that was way too simple. I too only pimp answers I consider good, which is not all of them.
03:35
I could never decide whether or not to put my SE stuff on resume type things... lol
I have my CR credentials on my LinkedIn page. :P
And I have a Careers 2.0 profile.
Well, it's TTGTS
Night!
I should have a Careers 2.0 profile. Seems a poor time to create it though considering I'm starting a new job shortly. Would hate for someone to read into that lol.
@rolfl I saw an analysis on Meta to which I'd guess you're referring. I don't remember all the details, but seem to recall thinking it was somewhat flawed itself (though I'm not sure the flaws invalidated its conclusion). There are certainly cases where I've taken extra time to write a better answer and eventually been rewarded for doing so.
@rolfl Good night. Sleep well.
Goodnight!
03:40
@JerryCoffin vvvv and ^^^^
5 mins ago, by rolfl
25
Q: How big is the Fastest Gun in the West bias?

Jon EricsonOne of the earliest phenomena noticed in Stack Overflow's voting system is the FGITW problem: the first answer is more likely to get upvotes than subsequent answers. Even if later answers are objectively better, the first answer forms a bandwagon that collects more votes than it otherwise would....

night all.... closing eyes.... gone
It's not too often a very new user posts a question and starts answering.
Okay, maybe not that new. But not something I expect from a user coming from SO.
It's especially rare considering he's low rep on SO. Awesome.
last one
4
A: SQL Join code check and peer review

MalachiIn this small of a query I wouldn't alias anything. It doesn't make it any more readable and you don't use those column aliases anywhere else in the query. you don't need to use them anywhere else. Don't do the reporting stuff on the SQL Server. you can set the title of the column in the data...

@Corbin He hasn't been taught bad habits yet.
@Donald.McLean that implies that the bad habits aren't innate in most SO users.... :p
03:50
@Corbin Well, a habit is, by definition, a learned behavior. :-)
True, but in my experience, it's simply life that teaches a lot of the SE bad habits x.x
Perhaps I have too little faith though.
Or perhaps it's just Shukla's Law.
Never heard of that before? Google doesn't have much either.
@Corbin Shukla was a friend of mine who was not a big fan of stupidity, ignorance, or incompetence. He once said "98% of the people in the world are idiots."
He never believed that he was part of the 2%
Ah. Very interesting. I seem to share his theory. I used to joke about a similar theory, just I used 99.5% (my self included).
04:02
Well, Shukla frequently believed that he had been optimistic. :-)
This was probably in the 2002-2004 time frame, though it's hard to keep track of time anymore.
I think Dave Barry was closer: we're all idiots at least 90% of the time. The "geniuses" are the ones who can manage to be intelligent maybe 5% of the time instead of less than 1 (or never in many cases).
Corbin, does it actually matter that that object isn't thread safe?
Vyorp Vyorp Vyorp
@nhgrif in practice? Probably not. In theory though, yes, it very much matters. Reading is safe without synchronization, but until the object is fully constructed all kinds of strange things could happen varying from wrong format to memory leaks.
Assuming ARC, how could it leak memory?
04:10
I'm not sure if it would or not actually. I just doubt ARC handles the case of race conditions.
Guess I could just get rid of the static and the nil check and create it every time.
Yeah, or the strftime route if performance truly matter sthat much
@nhgrif Let's see. ARC = Actual Race Condition. Sounds like exactly when it could have a problem... :-)
0
Q: Can/should some Objective-C questions also use the C tag?

nhgrifObjective-C is a strict super set of C. That is to say, absolutely anything that will work in C will also work exactly as is in Objective-C. What's more, Objective-C projects can even seamlessly integrate pure C files. This isn't necessarily all that common, but what is very common is signific...

Well, it's for logging. And we're talking about Cocoa. Anyone using Cocoa to develop non-UI based apps is an idiot... so we're talking about programs for which the end user won't see the logs...
we're also taking about a function that beings with #if DEBUG and ends with #endif, so the code won't exist at all in the release version
As such, I'd like the log to make the most minimal impact on performance of the app
So that the performance with and without the log is as close to identical as possible.
04:15
Hrmmm.... Debug builds of larger applications are always significantly slower to begin with... Then again, no need to needlessly add to that.
Maybe you should try profiling NSDateFormatter creation and see if it really matters.
Then again, since we're dropping to C anyway, strftime is about as fast as you can get, and it's not much harder to use than NSDateFormatter in this case.
Yea. I actually don't have a problem with the whole function being pure C.
I just don't know pure C as well as I'd like to
@nhgrif s/beings/begins/
huh?
oh
too late to edit
Someone on SO has just posted a LONG wall of gibberish as an answer...
@Jamal Are they from China? The Chinese have more experience with long walls than most people.
04:18
-1
A: PHP date() format when inserting into datetime in MySQL

xccxcxcfgfghffdgdgdasasafadsjdsfkljdsflkjdsflkdsfjkfgfghffdgdgdasasafadsjdsfkljdsflkjdsflkdsfjkfgfghffdgdgdasasafadsjdsfkljdsflkjdsflkdsfjkfgfghffdgdgdasasafadsjdsfkljdsflkjdsflkdsfjkfgfghffdgdgdasasafadsjdsfkljdsflkjdsflkdsfjkfgfghffdgdgdasasafadsjdsfkljdsflkjdsflkdsfjkfgfghffdgdgdasasafadsjdsfkljdsflk...

I really want to upvote this actually. — nhgrif 8 secs ago
Are we supposed to decipher this for the answer? Or is this the answer? — Jamal 9 secs ago
So, Google doesn't have anything to say about ARC and race conditions.
The "answer" was significantly shortened. It can be upvoted now (not).
That question is 4 years old too.
Oh... Corbin...
I can just use GCD's dispatch once
04:23
Considering the performance overhead of synchonrization, I doubt ARC does it.
Omg. Wow. Wish that had occurred to me.
That's the way to go
Oh god. Speaking of terrible Stack Overflow related posts:
-3
Q: Why is there no respect to new users in Stack Overflow?

AlaeddineStack Overflow is a great site for developers, but what I saw since I've created my account is that there is no respect for the new users here. Always down votes from moderators instead of helping encourage them to improve their skills in using this site. They always make them afraid. That's wh...

Yeah! This user should be respected!
I love that he edited the answer. I really don't understand what's going on there.
(post deleted or otherwise unavailable)
I'm surprised he even responded. Many users like that just take a dump and leave for good.
I just don't understand it. Was it trolling? Was it just very, very misguided? Like... what the hell was going through his brain?
04:33
Doctor very lost.
@Corbin I once saw a now-destroyed user named "poopy".
And his first post... was about poop.
@Jamal That would only be on-topic in a medical or gardening site.
Or perhaps parenting.
lol
Maybe it was just a misguided attempt at PHP OOP. Probably not though..... :/
The complete answer text:
> poop butt in the stinking assbutt poop
04:45
Is there a way to specify programming language when posting code?
@Corbin Thank you.
No problem.
Well, I did it - I posted another question.
05:00
Hrmm, the syntax highligher doesn't like Scala?
Interesting
2
Q: Event dispatcher

Donald.McLeanIn the last 2 years or so, I've learned a great deal about how to write better Scala code, but I know that I've barely scratched the surface. This is part of a library that I've been using. It has evolved a great deal since the first version and I'm curious to see how many mistakes I'm still maki...

@Corbin It looks right to me.
Oh I just meant that you had to manually specify the language. I'm surprised it didn't automatically recognize Scala.
It might have, but I like to be thorough. :-)
05:16
0
Q: Declaring a large number of 2d arrays to be used as 2d graphic sprites.

dwjohnstonI'm creating a Space Invaders game, and graphics sprites in it are defined as 2d arrays of colors. It seems like it's going to be cumbersome declaring these arrays the way I currently am: //This creates an inverting red/blue cross animation public Sprite myFirstAnimation() { ...

 
1 hour later…
06:28
0
Q: Optimize code to track player shot

2013AskerThis code is for a simple 2D tile-based game. x1 and y1 are the mouse coordinates in the world. entity->x1 and entity->y1 is the point where the player is, the shot origin. I would like to know how to keep the current output while simplifying the code and improving performance. void shoot(Map *...

06:51
0
Q: RubyKoans: Greed dice scoring

ivanThe Greed game, from Ruby Koans, where you roll up to 5 dice: A set of three ones is 1000 points. A set of three numbers (other than ones) is worth 100 times the number. A one (that is not part of a set of three) is worth 100 points. A five (that is not part of a set of three) is worth 5...

07:43
0
Q: Detect multiple devices in Keen.io collection

parsley72I'm trying to display data from Keen.io we're collecting from an iOS app where we report what devices of ours the app is used to communicate with. In particular I'm trying to find where there are more than one of our device. An entry from the Keen collection looks like: { "iOS_OpenUDID": "hex...

 
2 hours later…
09:45
morning
0
Q: Should I return objects from private methods?

dwjohnstonI have a private method that is called from the constructor to instantiate a bunch of objects. I can do it two ways. private Monster[,] createMonsters() { Monster[,] myMonsterArray = new Monster[8, 6]; for (int i = 0; i < 8; i++) { myMonsterArray[0, ...

09:57
0
Q: Linq dynamic select column and table

user3575477hello how I do dynamic select column query ? example CrewEntities _DbEntities = new CrewEntities(); // I'm using object context public class CrewItem { public string Name { get; set; } public string LastName { get; set; } } //I want to list only nam...

10:24
Oh god... The horrors of Java not having @Override before 1.5...
10:51
monking @skiwi
Monking @SimonAndréForsberg
You're the first one to be here!
How are you?
11:03
Monking, you guys.
Monking @Vogel612
how are you?
THUNDER ... THUNDER
wonderful
full vol. Thunderstruck
nothing better ;)
Let's see if I can find it
How will I find it on spotify :D
second one.
AC/DC, Thunderstruck
I've found one
11:10
@skiwi I'm quite sleepy, but alive :) How are you? :)
Awake and alive
Noting else matters...
Well...
That's Metallica..
Haven't heard that one in a while
but that's good too..
Woah, it lasted 6:29
Then AC/DC, then Tenacious D for a change ^^
11:24
Anyone here?
hey @Freeze
@skiwi Do you have any experience in Cracking Wifi passwords?
@Freeze Nope, it's not something I do on an usual basis ^^
@skiwi :-( i wanted to do it. I am searching for cracking wifi password since past year!
No Problem, if you can't help me
There was some app on android, but it is working less and less, because wifi generally has better security nowadays
11:29
Monking CRitters
Not in my country
In my country, people set their password of usually numbers
@rolfl ?
Monking @rolfl
@rolfl Effective Java is indeed quite outdated, but still all good to know and still shows a load of new things, on item 14 here now by the way
@Freeze where are you from, if I may ask?
@amon mmm....Asia
I mean, the south part of asia
ok :) that region is severly underrepresented in this chat room
11:35
@skiwi - I know people who can quote the book, reference things back to item numbers, and when I see their code, I like it.
@rolfl I don't thik I'll be able to reference the item numbers though..
@rolfl talking about @palacsint?
@amon have you ever hacked a wifi password?
@Freeze No. And I'm fairly sure it would be illegal where I live. But brute-forcing a password is probably not terribly complicated assuming you have basic scripting skills
12:10
Weekends are quiet on Code Review.
@Morwenn Until a plane crashes on your house.
@Morwenn Until you talked.
I had already gorgotten :D
Now it's not quiet anymore.
I love you guys ♥
3
12:12
Well, I got one helpful response to my question.
12:34
Today, I did a selfie.
12:56
@Donald.McLean I upvoted it ... the answer seems knowledgeable.
13:34
0
Q: Is the VC++ code that calls the DLL (C++) at runtime correct?

peprI need to implement some functionality of the otherwise monolithic application via DLL that is loaded at runtime. (Think about a customized DLL -- different for each customer.) The Visual C++ from VS 2013 is used. The application gets the full name name of the dll. The function to be called ha...

13:56
This answer needs more votes:
2
A: Finding the length of shortest transformation sequence from start to end

janosFirst of all, I really liked that your logic doesn't need to compare lengths: as soon as a match is found, it must be one of the shortest lengths, nice! And when the end is unreachable, the method returns 0, an impossible answer (since a valid length must be >= 1), so that's good too. A couple o...

Excellent answer. I would have written most of it too, if I hadn't been so tired last night.
I missed that question completely .... and yes, it's a good answer.
14:29
What would be a good language to quite easily load a HTML page and fetch parts of it's data? (for example, our lovely list of starred messages)
It's silenttt
I would've answerred that aswell yesterday, if it wasn't asked exactly when I wanted to go offline
nor seems a java 8 approach alright as it's explicitely an interview question seemingly without use of java 8
@SimonAndréForsberg I'd go for java with some HTML parsing lib
@StackExchange What's a fuction?
@skiwi Well, the questions doesn't say anything about Java 8 being prohibited, so I would assume Java 8 would be accepted.
0
Q: Better way of writing this class auto load fuction

Kid DiamondIs there a better way to write this autoload function? I want it to auto load and check for the class in 3 folders, but it should stop checking further if it was found before reaching the last folder. I am using the @ sign to suppress the errors the include returns if it's not found. spl_autol...

@skiwi Then I would need to find some "HTML parsing lib"... but I'm curious if perhaps Ruby or Python or one of those languages have an easy way of doing it
@StackExchange As I said: What's a fuction?
^^^^ fix it yet?
14:41
After reading the first bit of Effective Java, I feel it could also have been called Effective static factory methods in Java
I was waiting for @Jamal to edit it. It's so unusual that he's not around I completely forgot I could edit myself.
2
@rolfl Could you agree on that Effective Java is a little bit biased against static factory methods because of the fact that they needed to specify generic types at that time?
14:57
I will need to reread things to make a reasonable statement about that.
15:10
0
Q: Working with time, going from JSON text file to C# listview display

JaggaI'm working on a project where I need to be able to store times. For example, from 20:00 till 20:30 or 08:00 till 12:00 etc. Initially I was doing this in a simple text file and from the datetimepicker throwing them in each new line and they were going in as values such as : 20102050 08001200 an...

How is it that when I play a competative game, I'm always matched with the worst idiots and the enemy has all the pros...
@Mat'sMug you here?
0
Q: Increment the cells around one in a matrix

dystroyLet's say you want to increment the cells around the position (x,y) in a square matrix m of size T. I've written the same code in a few languages. Here's the JS syntax version : if (x>0) { if (y>0) m[x-1][y-1]++; m[x-1][y]++; if (y<T-1) m[x-1][y+1]++; } if (y>0) m[x][y-1]++; if (y<T...

15:27
@SimonAndréForsberg I don't think the TCG will be done in April though
@skiwi Totally understandable :)
More like... I have no clue
0
Q: MVP Pattern used in a payroll solution (Windows forms)

ChathurangaI’m using MVP pattern for a payroll system as my final year project. There are about 16 entity classes (like employee, client, salary etc.) in the analyzed problem and I have designed the solution as follows… No of UIs(Views) – 18, Separate Presenters and Models for each UI ( 18+18) , One Data Se...

0
Q: Complex boolean logic vs DRY

JoshWillikI have some code: $matchingEvents = []; foreach( $this->recurringEvents as $event ){ if( $event['RCE_Type'] === 'Month' && $event['RCE_Day'] === $dayOfMonth ){ array_push( $matchingEvents, $event ); } else if( $event['RCE_Type'] === 'Week' && $event['RCE_Day'] === $dayOfWeek ){...

I managed to add some new features into my Hearthstone Java game yesterday, and I plan on changing the way "enchantments" work, but it's still tons of stuff to add, not ready for review, and way too much code to put up for review anyway :)
However, I do have a concept in mind for a very fun game, which would also be much simpler than Hearthstone.
:o cool
15:31
I think the biggest problems with this challenge is that there's either very hard to come up with a nice concept for a game from scratch, or that many of the existing TCGs are very complex (Hearthstone, Magic: The Gathering, etc.)
Castle Wars is really the most simple one I know, and for the challenge it would be fine to create a simple copy of it, using about 10-20 (or more of course) cards from it.
I think the most challenging is to actually implement it...
15:44
Depends on what you want to implement :)
If you have lots of ideas with cool features, then yes... it's challenging to implement it.
I want to implement the whole universe.
No, but seriously, just take a look at only the model so far: github.com/skiwi2/TCG
-1
Q: Please Check my code to check why it is behaving strange

MubinI've developed an crawler. it is working fine if I try to print the urls that it generates. So I set the id to 20000 so that it must crawl 20000 ads(as per according to the URLs that it generated). But the problem is, it skips after the first iteration, mean after almost 1500 records it quits. ...

ugh, I must use arrays here
I'm jealous of you that you can use Java 8...
Hmm... this Python stuff doesn't look that bad...
It's all about the restrictions you put on yourselves or let be put on ^^
I feel stupid now...
I just realised that the "swimming pool" in Call of Duty 4 Chernobyl was most likely not a pool, but an emplacement for the nuclear rods.
16:05
@sim not really, ..busy with the kids ;)
0
Q: How could I more optimize this code

Mubinhow can I optimize this code more and more cleaned

@Mat'sMug Nevermind, I was just wanted to ask you about that C# Length thing, but comments sorted that out :)
0
Q: Improving a Haskell FizzBuzz Solution

awashburnI wrote a solution to the popularized FizzBuzz problem in Haskell to see how a functional solution looks. I'm more or less happy with my solution, except for the definition of list. It just looks sort of contorted. Are there any language features in Haskell which can improve the readability of...

Why do we have a close reason for code not being embedded in the post? I know that it is bad, but it should be edited and not a close candidate I think...
16:25
@skiwi because we can't edit the code into the question ourselves due to copyright and the CC-BY-SA 3.0 license all user content on SE sports. The asker (presumed to be the copyright holder) has to do that him-/herself.
17:13
@amon Ah okay, I didn't know that
And, that's why we have communication channels.... ;p
Stack&Karate makes for an interesting mix.
Working in a Dojo with loud music, lots of "kiya!", and thumping feet....
Nice!
^^^^^ (oh, you mean more of a comment than that?)
Looks like a significant selfie.
11313 reputation, almost binary.
So...
Do we understand the relationship between ObjC and C completely?
It's pretty easy to incorporate C++ into Objective-C projects also. It's called Objective-C++ and all you have to do is make a .mm file instead of a .m and now you can write C++ in that .mm, but I'm not even talking about that...
Because I'm sure there are simple ways of writing multilanguage projects for other languages too.
But in the case of Objective-C/C, it's kind of a misrepresentation to call it "multilanguage"
Any ObjC code that's not OOP is C.
17:27
@LokiAstari - The only problem I see with it is that you have an unnecessary plural of 'deals' in the first sentence. If you are worried about the selfie... there's no problem with that, other than the fact that you needed to do it. You pose really challenging code to review, and the more challenging the question, the slower, (but often more insightful) the answers will/may be.
This one (being multithreaded) probably restricts the number of people who could give it a decent review to a very small pool.
And as far as my understanding of C goes, if there's an Objective-C solution to the problem, there's a good chance that I don't know the C solution to the same problem. So personally, the main place my skills will be lacking will be where a C solution to the problem is better (for whatever reason).
But without a C tag, how many people that know the C solution but don't know Objective-C would look at a question?
@rolfl Doesn't multithreaded usually mean that execution (here: waiting for a reply) should happen faster?
@nhgrif The only question - is whether a person who 'follows' the C tag, will consider the ObjC questions to be polluting their tag feed.
Certainly not ALL objective-c questions should be tagged with c as well.
So, if a person tags their questions with C, they should expect that it gets a C review....
17:32
Yes.
But if you have objc and c tags, you should be expecting both.
And any objective-C specializations can be ignored by the C reviewer
Yes.
I don't see a problem with that, but that assumes that a 'reasonably proficient' C reviewer will understand the question.
I mean, at the end of the day, I need a function that takes an NSString object and prints it to the console with a timestamp. The one line of code you need to turn that ObjC NSString object into a C-style string is in the question.
If the question contains things that are ObjC specific, then the C programmer will be lost, and there's a problem
17:34
There is the NSDateFormatter code in there too... but surely C has a way of printing time stamps in a particular format...
And I think anyone who is proficient in any language can see that a class called NSDateFormatter exists purely for specifying the format that a datetime is printed in, and can figure out how to do the same thing in their own language.
Because as Corbin's answer to my question point out, where I'm using NSDateFormatter actually could be the biggest problem with my code... and the REAL answer might be to tackle this part in pure C.
Are there regulars that are well versed in C but clueless with Objective-C? They could keep a watch, and make sure the double language tag is being used appropriately.
17:57
0
Q: Best practice - SQL Schema to store Timerecords for a Time and Attendance module

VAAAI'm starting a time and attendance module in C# and SQL. There will be many time rules depending on every shift. For example: Shift 7:00 - 14:00 for Administratives: 15 min grace time, but if within a month there are 3 or more Late Arrivals then half day is discounted. Shift 7:00 - 14:00 for ...


« first day (357 days earlier)      last day (3959 days later) »