« first day (428 days earlier)      last day (3588 days later) » 
00:00 - 12:0012:00 - 00:00

12:01 AM
Goodnight!
 
Bye @SimonAndréForsberg !
 
12:27 AM
0
Q: Find K distant nodes

JavaDeveloperFind all nodes, which are at a distance of k from the input node. Check the sample diagram here. Input: target = pointer to node with data 8. root = pointer to node with data 20. k = 2. Output : 10 14 22 Looking for code-review, optimizations and the best practices. ...

 
12:53 AM
@SimonAndréForsberg No, the downvote is still useful. There's a bunch of crap that the answer is saying, the VM will never null out the previously set valu, but, in some threads, the value may never have been set to not null.
That's assuming a multithreaded application.
In a single-theaded application, the value will be null until you add an instance, after which it will always be not-null.
Also, in a multithreaded app, the value that is set could get overwritten by another thread which may not have known it was previously set.
So, the code is not thread safe.
Not at all.
Which is OK, so long as there is only one thread.
But, even single thread, and even "under heavy stress or memory use", the value will never be set to null after it has been set not-null first
Downvote that answer. Guilt free.
The accepted answer is not great either. It is mostly accurate, but completely ignores any multithreaded consequences.... the OP should at least be warned that in MT, the code is BS.
 
@rolfl sounds like someone should say something... I'll be happy to upvote a better answer from someone who knows better, like you.
 
On a 3 year old question?
Meh, 2 year old.
There, comment added:
I realize this answer is somewhat long in the tooth, but, it really should be pointed out that this answer is only true in a single-threaded use of the static values and methods. In a multi-threaded use case (which is likely the case here - it is android), the use of this system is likely to cause numerous unexpected 'features'. — rolfl 29 secs ago
 
1:18 AM
I'm not sure what to do with a question like this: codereview.stackexchange.com/questions/4605/… I'm trying to come up with a good comment, but first of all, it's nearly 3 years old and who knows if the asker will even come look at the comment.
 
@nhgrif He hasn't been around too recently. If important clarification is needed, then alongside a comment, it may have to be closed as "unclear what you're asking."
 
It's not really unclear what he's asking. He wants the code to run faster.
 
Ah, okay
 
But it's unclear why he thinks it's necessary to run faster or why he thinks it's possible.
If I knew a way to speed it up, I'd just post that.
Well, hmm, nevermind... I just came up with what sort of works as an answer...
 
@javadeveloper about the downvotes ... let's chat in the 2nd monitor.
 
0
Q: User Authentication Bundle

aaronmallenI wrote a user authentication program(s) for an MVC application. Before you ask part of the project specs are I have to store user information in company databases on servers that aren't the web server so the default membership classes are out of the question (as far as I am aware membership crea...

 
Got 'em. :-)
While you're pimping yours, I might as well pimp mine, which is still one away.
http://codereview.stackexchange.com/a/56224
 
I've just started working on an answer to the last unanswered ObjC question that's not my own.
 
How many zombies do you still have lined up?
 
Zombies?
 
1:45 AM
Old, unanswered questions.
 
Ah, there are only 2 left.
 
Well, I'm working on the answer to one of them.
The other is a question I posted yesterday or the day before.
Not sure I'll have an answer for that one any time soon
 
That's fine. Maybe someone else can.
 
1
Q: Catch-style unit testing in JavaScript (phase 2)

Dagg Continued from phase 1; please read it first for background. Overview This phase focuses on assertions. Here's where things get ugly. Catch uses macro expansions to decompose assertion expressions. Since we don't have that luxury in JavaScript without adding a build-time requirement, we ha...

 
2:01 AM
Last unanswered ObjC question that's not mine: codereview.stackexchange.com/a/56245/36366
 
2:15 AM
Wow. This is a good Meta post:
2
190
A: How much research effort is expected of Stack Overflow users?

Anthony PegramA lot. An absurd amount. More than you think you are capable of. In fact, asking a question on Stack Overflow is the absolute last thing you ever want to do. You want to avoid it at all costs. You want to think of it as a horrible shame1 that will forever haunt you and pass down from you to your ...

> Because so help me, if your question gets an answer within 30 seconds that has 10 upvotes within 3 minutes, you did not do enough research.
 
It's my philosophy as well. :D I haven't asked a question on SO ever since.
 
I've asked 7 total questions on SO.
My 3 most recent questions, 2 have been about Swift (one of those was self-answered)
 
I've just asked 3.
 
So, brand new language, you got to build up the library of questions. And with any luck, I'll be able to link back to those two questions for years to come. ;)
The other of the 3 most recent was a pretty well received question about how Objective-C properties work with C increment/decrement operators.
But I also have some bad questions from when I was in a C++ class.
 
2:31 AM
@Jamal I don't think that answer applies to people with enough sense to ask a decent question :p
good answer either way, though
 
0
Q: Automatically gravitate popover towards page center

andrew.carpenterI'm authored a couple plugins which show popovers on a given element. One of the objectives for both was no specification of plugin direction. So instead of the implementing dev having to specify direction: left the direction would automatically gravitate towards the center of the page while stay...

 
SO gives me a headache
I don't get on there unless I'm really bored
 
I just flag stuffs nowadays.
 
Does this seem rude or just direct?
> If you're on SO and complaining about people taking away your time by posting questions... Solution is simple: Don't be on SO.
 
Direct.
Heh...
-1
A: Parse Application Returning Incorrect Geolocation

PhilI am running it on the Xcode iPhone Simulator

 
2:45 AM
That "answer" should be a comment...
 
Yes.
 
Guessing, new user...
 
So, it's really interesting... in Objective-C (and this will likely carry over to Swift), we almost never throw exceptions.
I've never written anything that throws an exception.
I've also never written a try-catch block in any serious Objective-C code.
 
Is Objective-C == C# ?
 
No.
C# makes extensive use of exceptions and try catch blocks...
C# is under Microsoft and .NET and such.
Objective-C is Apple's language.
 
2:48 AM
Do you find Objective-C better in general?
 
I like Objective-C. Everyone else hates it. I've not done much with C#
Basically nothing.
I've done some Java, C++, and VB.NET
And a tiny bit of PHP.
It captures video at 120 frames per second. It doesn't play back the video at 120 frames per second. If it played back the video at the same rate it captured it at, it wouldn't be slow motion, would it? — nhgrif 7 secs ago
People have a hard time getting over the syntax of Objective-C.
 
> Is there any way to find frame rate of an video? to precisly get all frames.
^^ nice grammar
 
The general rule of thumb for Objective-C exceptions is that the only things that throw exceptions are things that are logic errors.
Things that 100% can be completely avoided.
 
I would think, all things Apple considered, that it would be simpler than any Micro$oft version...
 
And as such, you shouldn't be using try-catches in high level Objective-C code.
Instead, things that the programmer can't control that could go wrong, such as File IO, this is handled with an NSError object.
The file IO methods all take an NSError ** argument. A pointer to a pointer to an NSError object.
 
2:57 AM
I'm a bit lost on what a try-catch is (I'm a db guy) but I feel that makes sense
 
If there was a problem during IO, the NSError object is set.
try-catch is error handling
So, if something throws an exception (to let the program know something went wrong), it the exception isn't caught (try-catch blocks catch exceptions) then the program will crash.
 
That doesn't sound good...
 
@nhgrif that's interesting... I've wondered if a language with no exceptions at all could somehow work
 
Most languages, such as VB.NET, C#, Java, they all use exceptions for things that can go wrong outside the programmers control, such as a problem reading a file, for example. This means in these languages, you write all of your file IO in a try-catch block.
Objective-C still has exceptions, but they are (or should be) reserved for truly exceptional behavior, and really, as I said, it's all behavior that the programmer can prevent.
Like index-out-of-bounds throws an exception.
 
yeah, but do you really need them, I wonder, or could you just break control flow without "throwing" anything
 
3:01 AM
But you're not using try-catches for index-out-of-bounds exceptions in Java
So, in Objective-C, if you're going to read/write from a file
let's say you're going to read from a file
If the read is fine, the method returns an NSString * object (assume we're using the method that reads it as plaintext)
If an error is encountered, internally in this method, there likely is a try-catch block. But to the end user of this method, the result is that the method returns nil instead of an object.
And the pointer to a pointer to an NSError object is set to a new NSError object that contains details about what went wrong.
 
a lot of Lua code works like that
it's best bractice for the first return value to be nil if something went wrong
and you can return multiple values so the next return value could be an error message or something
 
So, instead of try { file IO code } catch { blah }, it's more like: file IO code; if(!error) { all is fine; } else { handle the error in some way }
 
where does the **NSError live though
 
8
Q: First simple program; counting button presses

thumbtackthiefThis is my first solo Objective-C program... it does the complicated task of displaying a button and counting how many times it's been pressed. It retains that count (along with the last time it was pressed) between uses of the app. I have a few specific questions, but eagerly await any and all...

 
3:05 AM
i mean how is it scoped
 
look at the second code snippet it my answer.
The one that starts: NSError *error;
 
i don't get that syntax, what are the square brackets for
 
That's how you call methods.
 
o.o
 
[contents integerValue]; == contents.integerValue();
 
3:07 AM
no wonder people don't like that syntax
so the error is a passthrough variable basically
that's not bad
 
[NSString stringWithContentsOfFile:datePath encoding:NSUTF8StringEncoding error:&error]; == NSString.stringWithContentsOfFile(datePath,NSUTF8StringEncoding,&error);
 
good lord
 
Swift's syntax is more like Java/C# etc
Although the variables are still named.
 
So in Swift, it'd be NSString.stringWithContentsOfFile(datePath, encoding:NSUTF8StringEncoding, error: &error);
 
3:09 AM
that looks much more natural to me
i wonder why ObjC deviates so much from C-style
 
There are other languages that use the square bracket syntax.
the thing is, to me, it actually looks a lot, lot more clean.
 
maybe it just takes some getting used to
 
It definitely does.
 
You guys keep carrying on with this procedural language.. goes back to database...
 
It took a while before I started liking it.
 
3:12 AM
@Phrancis - you may be interested in that new query too.
 
I'm not on that list, what does that mean?
Does that mean there aren't enough Objective-C questions?
 
@rolfl You keep flaunting your CTEs knowing I use MySQL... :p
 
I'm on the list, but no idea what it means
or what any of those columns are for
except the first three
 
I've been getting better at CTEs.
Coolest trick I learned lately:

    WITH ToDelete AS (
        SELECT TOP 1 * FROM #SomeTempTable
    )
    DELETE FROM ToDelete
 
The line order by FeedbackRatio desc kind of indicates it is related to feedback... but I haven't looked through the whole thing
 
3:16 AM
Yeah, I have now ranked it by feedback ratio as well.
There are really two questions answered by that query.....
1. how much people vote....
2. how much value is generated by a person's contributions to CR.
 
I don't think you can measure the value of contributions by the number of upvotes
 
@nhgrif DELETE FROM foo WHERE SomeId = (SELECT TOP 1 * FROM #SomeTempTable);
 
Currently, the Objective-C tag is mostly me answering questions by this user: codereview.stackexchange.com/users/14608/bazola
 
@DaggNabbit The value added is complicated....
but, it basically amounts to the votes the person casts, together with the votes on answers related to questions the person asks.
 
@Phrancis I don't want to delete from foo. I want to delete the top row in the temp table and the temp table doesn't have an ID column.
 
3:19 AM
Oh. Well that works OK then.
 
i.e. if I ask a question, and it generates 5 answers, and the average answer score is 2, then I have added a value of 10 to the site.
 
I think people vote more on things they can understand easily
 
I don't agree with that @DaggNabbit
 
and vote less on things that are harder to digest
 
I would agree with that .... but, the second thing is the feedback ratio... which is interesting.
 
3:20 AM
@nhgrif I'm almost positive that it's the case
 
People are willingly to vote somewhat blindly on things they don't understand.
Or haven't even looked at to determine whether or not they'd understand it.
 
^^ guilty.
 
If you assume that people 'should' do the following: vote on any question they answer, accept an answer to their own question, vote on answers to their own question......
the vote can be up, or down.....
 
That's a fair assumption @rolfl
 
but, if you have a feedback ratio of 1, then you have voted/accepted on each of those opportunities (or on some other thing as a substitute).
So, people with a feedback rato of 1 are breaking even... less than 1, are not, more than 1, are giving feedback on more than just what they participate in.
 
3:22 AM
I have very rarely gotten an answer that I felt was thorough enough to be the "one correct answer"
 
So... how come I'm not on that list @rolfl?
 
you are, 257
 
Weird. If I sort by name, I don't see me.
 
@DaggNabbit I don't know that it's designed to flag the "one correct answer" so much as to flag the "most helpful answer"
 
lower-case sorts after uppercase
 
3:24 AM
oh
 
@Phrancis I may have to start interpreting it like that, but I'm always hoping another answer might come along
 
You can always change the accepted answer.
I was really hoping the guy who posted this question would come back for more: codereview.stackexchange.com/questions/51670/…
 
yes, but accepting answers lowers the chance of it being answered again
 
Here's a thumb rule, if @rolfl posted it, it's likely the most helpful answer.
 
I'm mostly here to get good reviews, not to score rep, help other people score rep, help the site get out of beta, etc.
 
3:26 AM
Welp, if you post an Objective-C question, already having an accepted answer isn't necessarily going to shy me away from posting an answer.
 
and checking answers seems detrimental to that
 
In fact, this week I stole an accepted answer here and on SO.
 
@Phrancis not always true ... been batting a bad average recently.
 
I think you're in the minority there.. if I see the asker has accepted an answer I don't waste my time unless the answer was pretty bad
that has definitely been the trend on SO... once something gets checked, answers and views fall way off
 
@rolfl for all it's worth, every answer you've posted on my questions has been helpful.
 
3:28 AM
@DaggNabbit That's refreshingly honest, but it is symptmatic of a trend on SO that we are trying to avoid on CR.
 
I know, I'm just not sure it's the SO content that causes it rather than the SE format
 
SO: $this->sucks
 
I do wish questions like these had a way of eventually marking an answer as accepted: stackoverflow.com/questions/21234335/nstimer-does-not-stop There's been no activity for almost 6 months. The user's last activity is almost just as long ago. There's a posted answer (mine) with 10 upvotes, and several other answers (but none with more than 1 upvote). I don't even care about the 15 rep... but seeing the question is "unanswered" is a little irriating.
 
@DaggNabbit The numbers make no sense though, your ratio is 2.94
which means you have voted almost 3 times as often as what would be 'anticipated' for your questions/answers.
 
@nhgrif seems like people on SO just don't give a flying
 
3:31 AM
CodeReview, however, should almost get rid of the accepted answer altogether though. On StackOverflow, you are posting a problem and the answer with the checkmark is the one that resolved the problem.
 
Accept on code review is complicated, but the alternative is ... worse.
 
On CR, you're posted code you'd like someone to look over. Good answers here will not only provide some improvements that can be made, but hopefully also not overlap any other answers.
 
For myself I generally "accept" the answer that has the best advice about best practices/design/performance
 
Take this question for example: codereview.stackexchange.com/questions/55735/… I got the checkmark for the accepted answer. But honestly, I would've thought my other answer to this question should've deserved the check mark. It's less specific but addresses a much bigger, much more important issue.
 
Though most of the time other answers provide good tips as well, usually one stands out where someone has really taken the time to look at your code as a whole
 
3:34 AM
And if you compare my more specific answer (the accepted one) to GraniteRobert's answer, his is probably better and deserves the check mark over my accepted one.
But I probably got the check mark because the asker like my combination of answers
 
I feel a lot of the time I get 'high rep' votes.... people vote for my answer because it's my answer.... speaking of which, I think I may be in line for a serial-upvote reversal today.
 
Also... I just realized that the question is tagged . Is that really a necessary tag?
 
@rolfl I didn't understand that either, I don't vote that much
 
You have a lot of down-votes ;-)
Feedback is feedback.
 
@nhgrif you can't spell poop without
 
3:36 AM
xD
 
I have 53up,10 down on CR. Compared to 456up 886down on SO
 
You have 13 questions, 26 answers, a column not shown is the answer count to your questions... and you have 140+ votes and 2 accepts
 
hmm let me check mine
75 up, 70 down
maybe I vote more than I thought
 
I prefer not to look at mine :)
 
on SO i have 1062 up, 1119 down
 
3:39 AM
I don't always remember to vote, plus I sometimes post multiple answers to a single question, so that's probably not helping my feedback ratio.
 
Ahh, multiple answers to a question, I did not factor that in.
 
I think there's one question I posted 3 answers to, but I'm not 100% sure on that.
I know there's quite a few to which I posted 2 answers.
@rolfl Is there a query I can run to see how many times I've removed from a StackOverflow post?
 
@nhgrif can you find a link? I never saw a reason multiple answers would be preferable to one answer covering everything, would like to see a decent example
 
Like an example of me posting multiple answers?
 
yeah
 
UPDATE Beers SET Quality = 'Very good' WHERE BeerName = 'Schlafly American Pale Ale';
 
@nhgrif It can be done, but I don't know if a query already exists.
 
@Phrancis gotta love IPAs
 
^^ YES
 
codereview.stackexchange.com/questions/44644/… Three answers to this question.
 
3:44 AM
Belgian Whites are probably my favorite...
 
I can't stand how most Americans think Bud Light or Coors Light are good beers. does not compute
 
@nhgrif lemme check that out
 
Why are you storing quality as a varchar?
 
@DaggNabbit I've liked every Belgian White I've sampled (though not many)
 
@Dagg - I did it recently as well.... codereview.stackexchange.com/q/55824/31503
Gave an anaswer, and a few hours later saw a different problem, answered it as a separate answer.
Code Review doe snot frown on multiple answers.... it's not like SO, where there's only one problem to fix.
 
3:46 AM
Sometimes it's purely about length. Sometimes the separate answers come at different times. Sometimes the answers review entirely different topics.
 
@nhgrif, @rolfl are you guys doing that mostly because a single answer would be really long?
 
Sometimes. But not always.
 
Sometimes....
 
@nhgrif because VARCHAR does a mighty fine job of holding the value, 'Very good' :)
 
Sometimes the horizontal line doesn't feel like enough separation between two different distinct topics I want to address.
 
3:46 AM
I often post the second answer as a Community-wiki when I feel the 2nd answer is expanding on an answer I have already given.
 
never even occurred to me to do that
 
Reviewing the specifics of the implementation of a handful of methods is a very different review compared to analyzing the overall big picture of the class.
 
It's not intended to be a 1 item per answer thing, but, often, for a really large question, multiple answers make sense.
 
Alright, I
 
well, it does help the comment sections
more clear what people are commenting on
 
3:48 AM
Yes.
It would actually also help if questions where more specific in the scope of their question.
 
@DaggNabbit - here's one, for example that's interesting: codereview.stackexchange.com/questions/56135/…
I found just one method in the whole question that I wanted to post an answer on.
I have soime things to say about the other parts of the question, but they were completely different to what I wanted to say about that one method.
In a bit, if no-one else answers the bigger part, then I will go back and add another answer.
Bed time.
 
Here's another example of multiple answers being sort of necessary: codereview.stackexchange.com/questions/46357/…
 
Good night @rolfl
 
Look how big the question is
 
@rolfl right, and if you come back later, a separate answer might be better just so the comments under the first answer don't get confusing
 
3:50 AM
that's a big part of it too.
 
I have two not-so-short answers, and the question is still longer than my answers combined.
This question really should've been broken up into multiple questions.
 
see that's a case where it looks to me like the shorter answer could have just been tacked on to the other one
 
If anything, I feel I'd move the last section of the longer answer down to the short answer.
 
maybe that's why multiple answers feels weird to me... harder to reorganize. Don't want to move stuff from one answer to the other, because it sort of invalidates votes
 
Where in the short answer and in the last section of the long answer I'm addressing some specific implementation details
 
3:57 AM
One of the key parts to Code Review is that you can answer any part of the question you want: "Do I want feedback about any or all facets of the code?"
A complete answer would often be unfeasible for a single answer, and requires multiple people o do anyway.
 
that is true... i think multiple answers over a few days makes a lot of sense
 
Anyway, this has been discussed on meta a number of times: meta.codereview.stackexchange.com/…
(10 questions.... at least).
 
lol
 
still don't know how I feel about dividing a small project into multiple questions either... sounds good in principle, but in practice it feels like the context is lost by the second question
 
I know nothing about SEDE... but I'm curious to see a list of the top users at removing from posts on SO...
 
4:02 AM
hahah, one of those was mine
(meta questions)
site was still pretty young and jQuery one-liners were making me sad
 
The thing is, you don't need to see the entire project to review a piece of it. And if context is necessary, it could be provided via a github, but you post a handful of questions for several distinct/important classes in your project.
Then you can also post a question that focuses more on having the big picture reviewed.
But for the big picture review, we don't need to see every single line of the entire project. We don't need to see the implementation details of all the classes. We need to see how the classes interact with each other.
But a question that posts a entire project with 10 or more classes and says "Hey, review me!" is kind of unacceptable. That's essentially 11 questions, at least, all packed into one.
 
@nhgrif - point me to one question on SO where the tag has been removed.
 
0
Q: Parse PFUser CurrentUser Returning Null

JackI save a few objects in the _User class in parse, such as displayname, gender, and bio. A simple user profile. I'm having difficulty retrieving them. I tried with many types of queries with no luck. So I figured if you could get the username by doing this: self.username.text = [NSString stringWi...

 
@nhgrif I assumed a more literal interpretation of the phrase "code review" back then, I think. Expected something more like, you know, a real code review.
 
@nhgrif - can you make it a post that has been around for a week?
 
4:06 AM
A query looking at all the questions for which has been removed will probably time out...
 
No it wont
 
I'll see if I can find one.
stackoverflow.com/questions/24455866/… I just removed it from this one. The question was posted June 27, but I just removed the tag... because I came across it... lol... let me see if there's one where the tag was removed a week ago.
 
The history in SEDE is only updated once a week, so there's no history for anything until late Saturdays
@nhgrif - never mind, I can use a question I know of that had a tag removed...
 
Okay.
It's only a matter of time before I find one.
 
No need, I have a 'typical' history of a tag removal to play with
 
4:13 AM
k
It's pretty entertaining.
If you look at any given recently posted Objective-C/iOS question, you can tell whether myself or rmaddy is around because the post is most likely last edited by one of us to remove the
 
4:36 AM
 
4:53 AM
Hey 2nd Monitor, I'm back from Canada :D
 
My sympathies
 
the mountain biking was good, and the food was good as well. I could do with a little less eh? though
 
hoser
 
5:15 AM
lol
 
5:34 AM
0
A: randomizing array order with function

Daniel Watson$return instead of $retrun.. Think I need a rubber duck!

Or a spell-checker...
 
6:27 AM
or a language that doesn't let you use undeclared variables...
 
7:17 AM
0
Q: Merge Sort: Null pointer exception when using compareTo() method

w_ahmedThis is in connection to the Algorithms 1 class going on at coursera. The instructors uses Comparable interface so that the implementation doesn't depend on type. Here is my implementation: public class MergeSort { private static Comparable[] aux; private static void sort(Comparabl...

 
 
1 hour later…
8:35 AM
Well tomorrow is the big moving day. Not looking forward to it, but I am looking forward to it being over...
 
8:45 AM
0
Q: A functional binary heap implementation

DarwinI've implemented a binary heap in F#. It's pure and uses zippers for tree modification. To test it out I have implemented heap sort using it but it takes 10 seconds to sort a list of 100 000. Regular List.sort is instant and since heap sort should have the same complexity I'm wondering what I can...

0
Q: Processing large file in Python

Boris the SpiderI have some code that calculates the "sentiment" of a Tweet. The task starts with an AFINN file, that is a tab-separated list of around 2500 key-value pairs. I read this into a dict using the following function: csv.register_dialect('tsv', delimiter='\t') def processSentiments(file): with ...

 
I wish I could just SET @rightNow = (SELECT DATE_ADD(NOW(), INTERVAL 1 DAY));
 
9:10 AM
@Phrancis well you could try... using (Booze drink = new Booze())
 
9:23 AM
Monking*
 
9:40 AM
Monking all
@Phrancis good luck with your move, hope it goes smoothly!
Looking for a good PHP / MySQLi project suggestion
Or multiple projects
"Don't use PHP and MySQLi" is not a suggestion btw ;)
 
@CodeX well that would have been mine..
 
@Vogel612 haha i know its not the best platform but i love it
 
sure, do what you are best with ;))
well either way, I have to get ready to make french fries, so... I'm out ...
Laters
 
Cya
 
@DaggNabbit What is a "real code review" anyway?
 
9:55 AM
@SimonAndréForsberg 1. "REAL - actually existing as a thing or occurring in fact; not imagined or supposed."
2. "not imitation or artificial; genuine"
Im guessing a REAL code review is pretty rare
 
@CodeX I was more thinking of the Code Review part. I know what real is. But what is a real Code Review? Is it just because it's on the internet that it's not real or what is it?
 
@SimonAndréForsberg They are just asking for a genuine review of the code as opposed to a "spammy give me more repz" version
A code review could in fact be "Nice code, looks really good"
 
@CodeX That part I think is used way too little around here. Sometimes we just focus on the bad parts.
 
@SimonAndréForsberg Indeed but it is the bad parts that make the code bad, so i guess after suggesting fixes the code becomes "Nice Code", i wonder how many people take their review the wrong way and cry themselves to sleep..
I think the biggest problem as a beginner is knowing who is right, just because the code suggested works doesn't mean its the best answer, yet you will see it marked as such
I was told to use || instead of && yet i needed to use &&, was it a misinterpretation of my question? maybe.. maybe not..
The thing about the internet is that, everyone has an opinion even if they don't know what the F$%K they are talking about
Oops bit of a rant there.. sorry about that
 
10:21 AM
@SimonAndréForsberg you know code reviews are an actual thing in software dev right
Code review is systematic examination (often known as peer review) of computer source code. It is intended to find and fix mistakes overlooked in the initial development phase, improving both the overall quality of software and the developers' skills. Reviews are done in various forms such as pair programming, informal walkthroughs, and formal inspections. Introduction Code reviews can often find and remove common vulnerabilities such as format string exploits, race conditions, memory leaks and buffer overflows, thereby improving software security. Online software repositories based on S...
 
@DaggNabbit Yes, I've heard about it, but I don't get what differences those from what we do here?
 
if you ever participate in a real code review you'll understand ;)
some of what we do here comes close but some does not
 
So, code reviews should be carried out by competent programmers only?
Does anyone here do any paid work in reviewing for companies / individuals?
 
i have, yes
and yeah i think reviewers should be competent
the thing i was referring to earlier though was a tiny snippet of code that i didn't think really warranted a review, since it was not useful by itself and completely lacked context
 
Monking @all
 
10:37 AM
o/
 
Monking
 
.
 
@DaggNabbit Do you have a degree or any form of valid paper work to say your competent?
 
Anything happening?
 
Monking
 
10:39 AM
@CodeX yes, but i think competence ought to speak for itself
 
Monking
Pronunciation: \muhn`-king\
Function: verb
Etymology: Middle English, from Old English munuc, from Late Latin monachus, from Late Greek monachos, from Greek, adjective, single, from monos single, alone. Dervied from the American sitcom "Monk".
Date: 2006

1. To engage in a psychologically induced state of complete uncomfortability, often brought on by stresses such as; heat, lack of food, awkward social encounters, germs, etc.
2. Another term for a panic attack induced by social anxiety and/or physical surroundings.
 
@DaggNabbit Im just thinking from a clients point of view, they would need to know you were capable before taking you on unless they allowed a trial run or knew you as a person.
@Matthew Monking here means something different
 
yeah but the client doesn't care about a code review, it's more of an internal thing
 
@CodeX Oh
 
@CodeX unless you mean a company outsourcing code reviews, that i don't have any experience with, just internal ones
 
10:45 AM
@DaggNabbit I see, i struggle to get any real work in coding / IT in general because i don't have a piece of paper to say i spent 3 years at uni and at 31yrs old i don't think id fit in well on a campus
@DaggNabbit Yeah i guess i should have said freelance
 
@CodeX A bet would be to maintain some kind of open source project, which preferably actually gets used... I think that is one of the things you can do yourself
 
^ that's not a bad idea at all
 
Then I'd say you have higher chances... Some companies might totally ignore that, but do you really want to work for such companies?
 
@skiwi Yeah, i have a project that i want to make open source, just not ready for all the kicks and punches yet
Id like to freelance a bit and get some experience
 
I'm not so sure about freelancing, working in a company does give more experience I think
 
10:49 AM
if you have spare time, you could do some free work for a non-profit to beef up your portfolio
 
But that depends mainly about the fact that in companies you need to integrate your program with all kinds of running systems
 
like an animal shelter or "save the children" thing or whatever
 
And as freelancer that is still possible, I just think less likely
 
Great suggestions here, i have done some "free" work just for the experience, i will definitely get an Open Source project going and see what sort of feedback i get
I enjoy building websites but would rather be building applications, maybe plugins, not sure what platform i would do that on though
 
Lol
 
10:57 AM
Gonna go have Sunday Dinner, have fun! Bye all
 
later @CodeX
 
11:09 AM
@skiwi: the main advantage of working in a company as opposed to freelancing is that you can learn from other/better/more seasoned developers
 
0
Q: I need to run this progam to get continously output that are being updated in directory

Raghava private void button1_Click(object sender, EventArgs e) { string path = w4.getd1(); DateTime n = DateTime.Now; String.Format("{0:MM/dd/yy}", n); DateTime w = DateTime.MinValue; String.Format("{0:HH/mm/ss}", w); if (Directory.Exists(p...

 
11:35 AM
Does the part about the key lookup being slow sound really wrong to anyone else?
Thanks for the review, sorry I got back to you so late. I changed 32 to a constant, which should help my code be more readable and (perhaps?) run smoother. I removed the useless comments (which I really do need to work on). Also, the two functions used to be a key and value, but the if statements proved to be faster. And IIRC they're shorter than using two arrays/objects. If I used one object/array, then I'd have to search via key values, and that's incredibly slow (like, low thousands of ops). Thanks again! — eric_lagergren 7 hours ago
 
00:00 - 12:0012:00 - 00:00

« first day (428 days earlier)      last day (3588 days later) »