« first day (871 days earlier)      last day (1711 days later) » 

8:15 AM
0
Q: Writing computer generated music to a .wav file in C - follow-up

coderoddeSee the previous and initial iteration. Now I have refactored the code according to many suggestions made in the first iteration. See what I have: #include <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <stdio.h> /**************************************************** * From http:/...

0
Q: Repository pattern in laravel 5.1

user3514160I am currently working on an ecommerce project in Laravel 5.1. I have implemented Repository Pattern by learning from this site only for 1 model, namely, Carousel just to test myself as I am still at the learning stage. Now I want my code to be reviewed, before moving on to the next part of my ...

 
@Mast Hi! I'm at work right now, but I'd like to discuss some BF later on today.
 
Take a stab at using the CSV module in Python, and post your code on code review. docs.python.org/2/library/csv.htmlIceArdor 41 secs ago
 
@janos China and North Korea
@SimonForsberg Sure
 
8:31 AM
@Mast North Korea!? You gotta tell more about that :)
 
@SimonForsberg I definitely will, but I can't give too many details before tomorrow afternoon. Parts of the trip were sensitive.
 
I can imagine.
 
I'll probably make a room in time for all who are interested tomorrow, to prevent noise/repetition.
 
I definitely want to hear about that
North korea? you mean best korea
 
@ARedHerring Officially they're the Democratic Peoples Republic of Korea, since both sides agree there should be only one Korea.
For some values of democratic.
 
8:47 AM
Monking all
 
@Mast for some values of official
 
Countries have the freedom to decide their own name. In this case that gets complicated very fast.
I'd need to give a history lecture of an hour to point out why :)
@SuperBiasedMan Monking
 
monking @SuperBiasedMan
 
Well they can decide what they call themselves, but the rest of the world doesn't have to acknowledge it...
 
Definitely. You can call it South Dakota for all they care.
 
8:54 AM
0
Q: Breaking out of loop after inner most condition satisfies

user123I have nested for loop code, where if innermost condtion satisfies, I want to move on next record. I am confused here while considering break. Can someone please review the code. for record in fetch_record: total += 1 if total > 100: break ...

 
Would be even more confusing though.
 
I propose the Oppressed People's Prison of Best Korea
 
@CaptainObvious I sense not all of those breaks are necessary.
 
@Mast with that many breaks, he must like Kit-Kats
 
Welcome to Code Review! Unfortunately this question is off topic here as CodeReview is for people to give feedback on existing and working code. Please read the site tour to learn about what's on-topic here. — SuperBiasedMan 47 secs ago
@SuperBiasedMan Is it broken? It's definitely existing.
Perhaps too much anonymized, but that's not clear from your comment.
 
9:02 AM
Maybe I should've added "working as intended", they said "Issue with this is, it increments only filter_company_level no change in filter_with_material_info or filter_with_keyword_info"
 
@SuperBiasedMan That would have been clearer.
Not that the question is any clearer.
VTC'd.
Closed.
 
I think maybe I should split that canned comment into three separate ones, where each one has just "existing", "working" or "working as intended".
 
@SuperBiasedMan Did you pull it from somewhere?
 
@Mast Yeah I think I found it on meta, in a question about canned comments.
 
23
Q: Frequently Posted Comments

Simon ForsbergOn Code Review we often encounter questions with the same kind of problem over and over again. Some of us are using the auto comments script which allows you to maintain a list of comments to post. What are some useful tin-can comments that can be good to have in your list of comments? If you ...

The top answer looks a bit like yours, but does explain what the problem is.
 
9:16 AM
what the hell is going on with my git
 
Wut
 
yeah i don't understand either
 
That's perfectly rubbish.
 
i thought resetting to HEAD~1 would remove the merge commit but
 
You're using the in-built git functionality from VS, right?
VS may not approve such methods and use arcane trickery to undo it.
 
9:23 AM
@Mast I think I should run through and update some stuff from here, I'm pretty sure I had more of these before but lost them somehow. Thanks!
 
@Mast this is command line - nothing to do with VS
We don't use git with VS in work
 
@ARedHerring I think I saw some TFS comments.
 
Yeah, sorry, that's because (you'll love this):
yesterday no one was able to connect to TFS from work because our internal firewall was blocking it
 
Kudos to the firewall ^^
 
so I created a git repo at a folder up from the project (so as not to conflict with the TFS one) and git init so I had some source control
this repo is the result of that
 
9:26 AM
Ah
Looks like it should be working though. It's messy, sure, but it did exactly what you wanted it to do. Provide some source control.
 
yeah.. i refuse to use microcrap products from now on, professional
also visual studio just crashed when trying to build -r ight on cue
 
lol
 
looks like i have an interview with toptal on the 9th
 
That's some kind of fresh detachment company, right?
 
I believe they are a kind of contracting agency with very strict hiring criteria
their site says they pride themselves in only offering the "top 3% of developers"
but, well, my OSS partner told me to apply for it so shrug
 
9:43 AM
Monking
@ARedHerring Actually that revert looks like you went down the wrong branch...
get back to merged state, run git log --oneline --graph --decorate and then revert to the other branch by revision
 
@Vogel612 yeah im assuming that my revert took me to develop's HEAD, which is indeed that commit
 
git reset --hard 0c4b9a2
if I read that non-graphed log correctly.
 
@Vogel612 I did actually reset to that initially
and it did the same thing
 
Luckily we have graphs nowadays
 
if reset gets you to a wrong rev, somethings very wrong
 
9:49 AM
.... I lied, it worked, kek
heres the graph
* 7616052 move controller before state
* dd0da5b merge with upstream one last ****ing time
*   b1ef27c Merge commit '0c4b9a2' into report-activity-summary
|\
| * 0c4b9a2 temp cmomit
| * 8c8e1f2 add template
| * 13094f6 remove ng-app directive
| * e42d166 add empty controller
| * c34daa7 add initial template
| * c4e1eb4 remove old cruft
| * 92828a3 add state to menu; add data property
| * ac97d3a remove old reports and add Activity Summary state
* | 9d6e493 remove old reporting services
* | 33fd758 another merge from upstream
I meant to reset soft the temp commit (because its temp) and then redo it
maybe i should just stick to stash for temp commits
either way, it doesnt matter now - appears to be working
TFS, that is
 
@ARedHerring yes, you should..
 
@Vogel612 lol
@Vogel612 i use git quite a lot but only the basic features, I don't suppose you have any resources I could read a la workflows etc?
 
atlassian has got some cool workflow overviews..
 
@Vogel612 thanks
 
10:04 AM
Thanks indeed
 
10:28 AM
-2
A: TicTacToe in Haskell

Arnout window.location.replace("<!-- begin snippet: js hide: false --> en.wikipedia.org/wiki/Haskell_Curry") thanks just try this exercise http://foswiki.cs.uu.nl/foswiki/pub/FP/CourseAssignments/Assignment2.pdf en you wil understood dat thanks with friendly greet, Arnoutd ve...

Pretty sure this isn't a sincere user.
 
hoi hoi hoi
lol, the edit
 
Would've been rejected for going against the author's intent I think :p
 
Not quite sure what they were trying to do, cause it was just a poorly formed answer at first and then it devolved after I commented.
 
I would have voted it for deletion due to lq
even post-edit, its just a link to a website
 
VTD applied
 
10:31 AM
it ded
 
@ARedHerring After editing it, I flagged it for mod attention to "please convert answer to comment"... (mods can do that).
 
Mods are gods.
It's funny how little it now resembles the original post.
 
Not really, the original answer was some poor English blurb, with a link that was not well formatted. codereview.stackexchange.com/revisions/105349/1
 
I honestly think the link was the only somewhat useful info out of the answer
 
If I were to still have a mod hat, I would think the user was a troll, but the link is related to the question.
 
10:37 AM
@SuperBiasedMan Wow, that's bad.
 
Same. Considering their English looked so fakely bad in the comments they replied to me with.
And they just spammed edits after.
 
As a comment, the user can't edit, and mess with it, so you get to keep the valuable info, in a clean state, that can only be deleted now by the user.
 
Oh when I said it was funny how little it resembled the original answer I meant cause that answer was a mess and now the one useful bit has been extracted from it.
 
0
Q: Procedural Map Generation repeat why?

MunkybunkyI am generating an infinite procedural random map of 0's and 1's based on location (x and Y) but only generating a small part on screen. When moving I generate and show the next part so if we have moved to the right by 1 tile I apply an offset of 1. Complexity is how big the current view area is ...

 
@CaptainObvious broken
 
10:42 AM
@SuperBiasedMan - "Welcome to Code Review" for: codereview.stackexchange.com/users/32063/… ?
 
@rolfl Hrm. The autocommenter is acting funny.
It added that, now all my canned responses are missing.
 
@SuperBiasedMan perhaps they've been... canned
 
@ARedHerring I cann't believe you made that pun.
 
@SuperBiasedMan Code Review is about improving existing, code working as intended.
That grammar.
 
@Mast @SuperBiasedMan autocommenter is having a stroke
 
10:45 AM
Looks more like it's on strike.
 
@ARedHerring No... that part was me.
 
Refusing to work, properly.
 
11:03 AM
0
Q: The trip challenge from "Programming Challenges" book

Baroudi Safwenei read the input using double, then multiplied by 100 and put them in an array. my idea is to calculate the average and then calculate the difference between the average and the values below it, based on my manual tries. my code works for both the examples in the book and all the example that i c...

 
@CaptainObvious Asking for help because their code gives unspecified errors in certain cases, still off topic even though it worked for the examples the challenge gave, right?
 
11:21 AM
Huh, there's an implicit cast from double to long... is that valid, in C?
     long *spendings ;
     double input ;
  ....
             scanf("%lf", &input);
             spendings[i] = input*100 ;
 
11:46 AM
2
Q: Binary search implementation in C

Anatolyint bin_search(int* a, int key) { int lo = 0; int hi = sizeof(a)/sizeof(int) - 1; while(lo <=hi) { int mid = (lo + hi)/2; if(key < a[mid]) { hi = mid - 1;} else if (key > a[mid]) { lo = mid + 1;} else return mid; } return...

 
12:04 PM
0
Q: Project Euler #12: Highly divisible triangular number

Song KyungwooI want to receive advice on my code. It is too slow... Please visit here! source import math import numpy as np import copy from operator import add memoi_table = {} #check whether the x is prime or not #to do a prime factorization def prime_finder(x): cnt = 0 a = math.sqrt(x) sq...

 
12:15 PM
I linked to the Options Summary page in my answer, which groups all options into one page. GCC code review policies do not allow new options without documentation, so the docs should be comprehensive. — Jonathan Wakely 24 secs ago
 
Afternoon :)
 
afternoon @DJanssens
My colleague just shared an awful joke with me
What do Floppy Disks and Jesus have in common? They both died to become the icon of saving
10
 
Is it that time of the day? :D
 
He is on earlies, so his entire day is 1 and a half hours ahead of ours
 
12:37 PM
:)
 
0
Q: split redirecting to multiple files in bash

larkeyAim: A function mycommand which runs command and: gives me three log-files which are: *.stdout.log : everything from stdout *.stderr.log : everything from stderr *.full.log : everything (ie., both, stderr and stdout) prints all output to screen Concept: The idea is that I can quickly see...

0
Q: Python add argument to active thread loop

Gotowy do lotuimport time import threading import time def test(X): print(X) threading.Thread(target=test).start() while True: test("abc") ????? test.send("abc") ???? How add args "abc" to thread ?

 
1:02 PM
Monking
@ARedHerring Is it Friday already?
2
 
Monking
 
Monking
 
I think I finally figured out how to eat an elephant.
 
@ARedHerring LOL I love that, I am so tweeting that
 
Tweet tweet
 
1:08 PM
hmm.. I am finally at 45% coverage.
 
@EBrown Gnaw on it a bit then post on the stack exchange to ask why it's not in your stomach?
2
 
@ARedHerring They have another thing in common too, you know....? Miraculously, neither are really dead!
 
> This thread is now about Religion Spiderman Code Review
 
@SuperBiasedMan Nah, ngrif has a blog post on eating elephants (in regards to coding) and I think I finally understand it.
 
1:51 PM
"What else would you expect from an answer to pass your judgement, @SuperBiasedMan?"
Gonna start referring to review queues as 'judgement' now.
 
@SuperBiasedMan link?
 
Sorry, but IMHO it answers the question perfectly. OP asked whether ot not it was possible to move files to another location and I informed him that it is not. What else would you expect from an answer to pass your judgement, @SuperBiasedMan? — MBaas 4 mins ago
 
@SuperBiasedMan that question is agreeing with @nhgrif's opinion of questions ;-)
 
i think my work is opting to use manual sql upgrades instead of sql migrations... kill me
 
monking!
 
1:58 PM
monking @Mat'sMug
 
Monking!
 
0
Q: Reuse a base class [Activity] handler in all sub classes for background work

divyenduzWe are using the Thread of a common base class but using it's handler in all it's sub classes. The code is working fine but is it the right way to go about ? Our base class looks like this, public class BaseActivity extends AppCompatActivity { public Handler mHandler; protected void on...

 
@SuperBiasedMan I'm not involving there, you both have good points :)
and his answer do provide a little more detail in how he can achieve it in like php.
while the other answers is actually a plain no
 
meh, it's a shitty question
 
2:05 PM
^ that
 
indeed, the question should be downvoted
 
to oblivion
 
Yeah. I would've just blamed the question except I saw it in the Low Quality Answers review so I responded to it more in isolation there. I definitely don't think they should've answered.
 
no effort in searching it yourself
 
actually it should be closed as UWYA or Too Broad
 
2:05 PM
UWYA?
 
but can we not discuss crappy SO questions here?
3
unclear
 
unclear what you are asking
 
@Vogel612 stargreed
 
TTGH
see you all later ;)
 
what the... posted an answer, got an upvote within seconds
nobody reads that fast
 
2:24 PM
@Vogel612 Link?
 
I've seen CR mods handle my flags in 7 seconds. I guess people can read pretty quick nowadays.
The impression on itself must have been worthy of an upvote in upvoters opinion, which should be taken as a compliment :-)
 
FWITW answers really do get more votes..
Answered a bountied question: 2 upvotes
answered a new question 4 upvotes, and that quicker..
I don't understand voting.
 
I don't understand it either.
Just speculating.
 
@Vogel612 My vote. I read this fast.
 
2:30 PM
And there is the fact also that I'll upvote anyone in this chat room that I know because I know they generally write good reviews
 
@ARedHerring please not, that's not fair to those who don't chat.
 
I don't see how it's not fair..
I'll upvote anyone who wriets a good review and read their review, too.
 
I upvote all good questions/answers I see. If those happen to be in chat, so be it.
 
But I will be more willing to upvote someone from chat simply because I know them in chat and I know they won't write a crap review
 
@ARedHerring Not necessarily true though.
 
2:31 PM
Obviously I won't upvote them just because "oh, look, mast wrote a review upvote" - I'll read it first
 
oh while we're at that...
bounty running out in < 10 hours
 
@ARedHerring Lousy example, I rarely write answers ^^
 
@Mast shhhhHHHHHH
not the important thing here
 
lol
@Vogel612 JavaScript, can't really help you with that.
 
2:33 PM
he's saying it for my benefit because I said I would write a review yesterday and didnt get aroudn to it
 
it was more for the Herring
 
+ 50 rep bounty omnomnono
50 rep closer to a mug
 
I'm considering dropping Flambino a comment, too
 
Found this in a review: Name the functions avoiding to what they are doing.
Autocorrect +1
 
typo?
 
2:36 PM
@Vogel612 Most likely, fixed it.
But it was such a nice typo.
 
@Mast Has anyone really been far as decided to use even go want to do look more like?
 
Totally bad advice.
@ARedHerring Probably.
 
@ARedHerring 42 is the answer to this question
 
@TopinFrassi That's cheating; 42 is the answer to the universe, life and everything.
 
@ARedHerring Yeah but it doesn't do well as a SE answer.
 
2:42 PM
and when I just said we don't want to discuss crap SO posts...
that reasoning is ad 1) nonsensical and ad 2) not even relevant to the question asked... — Vogel612 1 min ago
94k user...
 
@Vogel612 s/ad/??
 
not necessarily
 
your commenter also removed tag from the OP (but left )
 
Woah. They have 21/5 progress for the curious badge (the bronze one for asking questions), they must have a bad question record.
 
I wonder how long before that person gets suspended ... again.
 
2:44 PM
> “Never argue with stupid people, they will drag you down to their level and then beat you with experience.”
― Mark Twain
That's his profile comment.
Funny, I only ever see that comment on people's profile when they don't want to admit that they are wrong.
It's like when people use the Marilyn Monroe quote to justify being an ass. No, you're not "at your worst". You're just being an ass.
3
 
Well, I suppose it's reading time for "C# In Depth."
 
@EBrown First page: "We're sorry for how unreliable VS is. The end"
(I joke - but right on cue, VS crashed - again)
 
@ARedHerring Except that this book doesn't really mention Visual Studio.
 
@EBrown It was a joke. :p
 
@ARedHerring VS is getting worst and worst in my opinion.. I used to love it but since 2013 it is alwaayyysssss crashing
 
2:48 PM
I just like to hate on VS every chance I get.
Because its awful and makes my daily job hell.
Something something a bad workman blames his tools
 
try asking on codereview.stackexchange.com — Daniel A. White 23 secs ago
 
@GeorgeStocker shoot it over to us, then. seems to be okay. — Vogel612 6 secs ago
 
@ARedHerring I don't hate it. I think some tools in VS are really great. But damn, it became so slow.
 
Welcome to the 2nd monitor @larkey
 
Welcome to 2nd, @larkey :)
 
2:56 PM
I never had the chance to get a better code completion tool with another IDE than VS
@Vogel612 Hello!
Oops
@lar
this is getting out of hand : @larkey, hello :)
 
@ARedHerring Karma
 
131
Ask Microsoft

Proposed Q&A site for users, professionals, and enthusiasts of Microsoft products, hardware, and software and those with questions about Microsoft the company and its history.

Currently in definition.

Anyone care to help them out?
 
not a microsoft person
 
Then you should really get in there and vote on some questions (preferably those that are not at 10 already).
 
@EBrown Good idea, on it.
 
2:59 PM
Top voted
> Who created the first "Blue Screen of Death"?
 
Oh, I see I already did vote on a lot of them.
Primarily downvotes.
 

« first day (871 days earlier)      last day (1711 days later) »