« first day (788 days earlier)      last day (2518 days later) » 

6:01 AM
'night CRitters
Night @Mat'sMug
I'm taking a short hiatus from the internet for a few days. Taking a vacation of sorts. I'll respond to pings when I get back.
@Phrancis Aww, bye SQLGUY
Have fun :D
Thanks :)
6:14 AM
Have fun, and good work lately
Ping me when you get back, okay?
I'm gonna throw you a massive SQL party
And by that I mean I'm gonna fail at writing a query and present its mangled corpse as a trophy
@Quill Hey, I'm JAVA/RubyGUY
i am a GUY
Do you guys think a for loop bug question would be suitable for a programming interview?
	// (1 * 5) + (2 * 5) = (3 * 5) + (4 * 5) + (5 * 5) = 75
	public static int sumOfMultiples(int value, int multiple) {
    	var endValue = 0;
		for (var i = 1; i < multiple; i++) {
			endValue += value * i;
		return endValue;
6:20 AM
@Quill abstraction factory method would be better :P
@Quill Indent the first line and you'll be good
@QPaysTaxes sumOfMultiples(5, 5)
should return 75, but returns 50
(I see the bug)
Indent it correctly and we'll talk
address the first = in your comment too
@Snowhawk04 That too
6:23 AM
What language is this in again?
In Ruby I'd do something more like
@Quill CamelCase your method name also :)
You really could one line that in Python
def sum_of_multiples(value, multiple)
  1.upto(multiple).inject(0) { |memo, cur| memo + cur * value }
6:24 AM
@Mehrad Yeah, I kinda just spewed it in chat, I didn't really even paste it from VS
Q: Comparing two objects having 2 Nullable Date Fields

ArjangExpiryDates has two properties PSL_ExpiryDate and MNL_ExpiryDate of type nullable date. I am trying to compare two objects for having same or different values. Is there a cleaner way to do the same as the code below? private bool SameValues(ExpiryDates ExpiryDates1, ExpiryDates ExpiryDates2) ...

And your variable names
@Quill I was just worried Camel might get offended that's all :)
BRB going home
@Quill Cya
So if I max today I'll break 3k :D
6:28 AM
That's cool
But my colleague asked me to help him write some questions and I kinda got a little mad cause hems already interviewed people without basically any structure
@200_success Can I spout out a few curses because that's utterly infuriating?
Hey hey
They all sounded alright
I didn't get to look at their resumes and LinkedIn was unhelpful as usual
No, I'm mad that an interviewer didn't bother setting up a structure for the interview
@Quill I've seen worse.
Monking btw
6:40 AM
In my office, the structure goes Top Dev (rarely in office) > Above Average Dev (Full Time, migrated from Front End Dev) > Me (School Holidays)
@Quill In my office, the structure goes NoMethodError: undefined method `get_schedule' for nil:NilClass
7:04 AM
...Man, people like copy/pasting from Wikipedia without attribution
@QPaysTaxes that's because it's so dead simple
@Vogel612 No, no, the bit that bothers me is "without attribution"
It's also dead simple to copy/paste a source
but you have to remember doing it
...Okay, let's put you in a hypothetical situation
You just copy/pasted the first paragraph of a Wikipedia article.
What are the odds that you meant to but forgot?
7:12 AM
lemme guess.. tag excerpt?
This is more suited for Code ReviewGerald Schneider 11 secs ago
Versus, say, the odds of never meaning to.
Nope, it's the full wiki
Literal, word-for-word copy/paste
probably like 1 : 99
I'm rewriting it now
or even worse
7:12 AM
@Vogel612 1 to 99 what?
forgetting : never meaning to
Yep, that's what I was thinking
It pisses me off so much
I've forgotten quite a few times, but that's when I was going for a more complicated citation and closed the tab and couldn't find it again.
I don't think I've ever done something fancy on SE, though
Q: Wordpress WooCommerce Responsive cart (github)

YconThis is a great little plugin- a WooCommerce shopping cart. Only a few minor changes are needed to make it great. I have made some attempt on this- but not gotten far. All it should need is some minor PHP & css changes. The author has given his permission to work on this so please contribute. ...

@CaptainObvious at the very least off-topic, if not worse.
@QPaysTaxes, I did all of those tag wikis, sorry, but out of curiosity, which one are you talking about?
7:25 AM
Cite your sources.
I'm rewriting it now.
Ah, that one was fun
"was wondering if you Java gurus would share your state-machine advise for this example" Belongs on CodeReviewVince Emigh 37 secs ago
Q: jQuery range slider change text based on hidden field value

Thomas TaylorI am working on a jQuery ratings function that uses the Foundation range slider. My current implementation works correctly on 2 of 7 of my range sliders. However, I am quickly realising that my implementation will become bloated as I have to repeat myself for each of the 7 range sliders. HTML: <

Straight copy paste, and the article I copied the brief off had a different first name spelling Andrei instead of Andrey, they both apply but the second is what Wikipedia had
@QPaysTaxes To be honest, it's better than no wiki at all.
7:31 AM
@Mast It is, but there's this little thing called a license
^ that.
I'm not good with licenses. Neither is the internet.
It's fulfilled by literally just writing [Source]([link])
That's it.
I know, and it should have been done.
But there's such a thing as writing iteratively.
In this case, one person decided to fill the wiki, the next has to make the sources look good.
Er, one thing
7:33 AM
That's not how it's supposed to work, but it works.
I never said there were.
I only happened to find out it's from the Wikipedia article because I was Googling to refresh my memory on the subject
The article is an obvious copy-paste, look at the style it's written in.
@Mast I write like that when I'm writing formally.
7:49 AM
Gave a very thorough tag edit
@QPaysTaxes, I was working off the logic that:
25 mins ago, by Mast
@QPaysTaxes To be honest, it's better than no wiki at all.
@Quill You should have also worked off the logic that
25 mins ago, by QPaysTaxes
@Mast It is, but there's this little thing called a license
I did do like 50 something edits too, so that helped
But yeah, I understand
And you couldn't be bothered to give your sources?
And your input is noted for next time
7:57 AM
Thank you.
Actually, updated figure: 69 edits for today
...I just got 4 rep from one edit
*Two edits
No, I'm pretty sure it was just the one
There's the excerpt and the body, they're counted 1 each
8:00 AM
@QPaysTaxes, isn't it 4am where you are?
@Quill Yep
@QPaysTaxes Sleep man, sleep
@Quill Why? I have coffee and sugar and work to do
@QPaysTaxes Caffeine, alcohol, sugar and water (which is usually covered with the first two), that's all you need.
8:08 AM
@Mast ...So my normal coffee, but with vodka
Got it
Sugar to keep your motor running, water to prevent dehydration, caffeine to stay a good programmer and alcohol to prevent hyperactivity.
If you try to stay awake for longer than 24 hours I'd recommend meat as well, keeps your stomach friendly.
You know what they say: Code drunk/caffeinated, Debug sober
If you write it the way you're supposed to there's no need for debugging, right?
Who needs unit-testing anyway...
Yeah, right, let your clients debug for you when they run the solution
@Quill Yea, or get a QA department.
8:18 AM
@Mast Does ice cream count as meat?
@QPaysTaxes Does it taste like meat?
@Mast It tastes like chocolate
But yeah, I'll have some meat
Thanks for the advice
Somebody should write a 'LAN-parties for dummies' with tips like these.
You should
No, wait, let's make it a collaborative project
@Mast I remember when I did those, long time ago, now it's just teamspeak ;-;
8:22 AM
@Mast add in "Do not plug all Computers into the same (possibly even chained) multi-outlet"
"Do not start all Computers at the same time"
"Use simple tools: an unused router can do great as DHCP"
and so on..
@Vogel612 I did that once, when I was brought in to help set a new computer lab
Because they didn't understand that I was good at programming computers, not setting them up
@Vogel612 Haha, yea. I always bring a haspel exactly for that.
@QPaysTaxes Tell me about it. People think I'm an expert with all computers and everything else with a cord.
@Mast Heh, speaking of cords
Someone once expected me to know how to set up an old Ms. Pacman machine
Being an EE engineer doesn't make you all knowing all of a sudden...
I'm not even an EE
8:27 AM
@QPaysTaxes Ooooh, those are awesome on the inside.
@Mast Really?
All I've ever taken apart is an old desktop
Like, totally dismantled.
It's like a really old, specialised computer.
I broke everything down as far as it would go
Arcade machines are pure gold, technologically speaking.
I still have pieces of the RAM that I hammered to pieces in frustration
8:32 AM
@QPaysTaxes on a related note: "Don't think that the heating of Computers is sufficient to party in a garage. in winter"
@Vogel612 *unless you want them to melt
and don't plug in 2 2KW heaters to the same outlet
at all
@Vogel612 I don't know what the current rating there is, but here it's 16A. That's roughly 3.6kW per group.
yes, exactly..
Aaand there's the boundary of my knowledge, fast receding
However, if you have a 3-phase outlet, you can plug 3 identical devices in star and cut the nul-wire.
I know kW is kilowatts and A is amps
That's about it
8:49 AM
it boiled down to getting current from another separate circuit and plugging one heater and 2 Computers with attached stuff to each circuit
@QPaysTaxes P = U * I (Watts = Voltage * Amps)
@Mast that's ... hard wire already, right?
3-phase has L1, L2, L3 and something for the return current. It's called Nul here, not sure what the international name is.
@Mast ...I'm just gonna Google it
@QPaysTaxes Basically, if you have 230 V on your outlet (most of Europe does afaik), you can draw at most 3680 W if you're current limited at 16A.
8:52 AM
@Mast Ohh
My house is 120V I think
Yea, American housing has 120
But you probably have more Amps per group to compensate (I hope).
I wouldn't know
Another trick with LAN-parties is if you don't know how the groups are divided in a certain house you can always try the kitchen.
Kitchens should have at least 2 groups.
Lemme guess, it's to prevent shorts from overloading one
Because kitchens have a lot of appliances typically
You'll blow the fuse if you draw too much, not short anything.
8:55 AM
...Same thing, to me
@QPaysTaxes A lot of high-power appliances, yes.
Shorting something is like connecting the two plugs of your outlet without sufficient load.
No, I know what a short is
I just assumed that's what blowing a fuse was
Though in retrospect that's idiotic
Blowing a fuse is often the result when shorting, so it's not that crazy.
But shorting ends up with a path for lots of power to go through
Whereas tripping a fuse blocks any from going
You're drawing more power than the fuse allows you too. Shorting and using too many high-power appliances are the same in that regard.
Both will blow the fuse.
8:57 AM
No, I meant that I thought the fuses blew because the fuses themselves shorted
As in, "my fuse blew" is synonymous with "my fuse shorted out"
That's what I thought
well shorting it usually makes it use the max current -> draws sh*tloads of power -> fuse blows
@Vogel612 I get that; I'm explaining my misconception
Q: Markov chain-based word salad generator

QPaysTaxesI like Markov chains. Last time I used one, I made one that generates words. This time, I made one that generates sentences, given a set of words and valid connections. This time, it's not weighted and it's reading from a JSON file, so the code is a bit simpler: require 'json' data = JSON[ARGV[...

@CaptainObvious Hi, Captain!
In Germany kitchens often get one standard circuit and one with rotary current for stove
and fridge, dishwasher often get a second standard circuit
8:59 AM
@Vogel612 Define 'standard'?
but that one usually has no outlets.
Rotary current?
@Vogel612 Allright, that's standard here as well.
Rotary != Alternating?
I dunno
I know basically what alternating current is
9:04 AM
Nothing about food and current division though...
Q: Count chars difference between two strings

HeeLGiven two strings with the same length, we check how many chars on the same positions are different. For example: ABCD and ABBD should return 1. Here is a link to a gist with tests, to have a better understanding of what I'm building. Here is my solution: object Hamming { def compute(str1: St...

Wow, the entire cast of Heroes is in Hawaii Five-O apparently
Fascinating how that works out
@GeraldSchneider Only code that you wrote or maintain is on-topic on Code Review. — 200_success 44 secs ago
@Duga If he posts it here, it will be nuked instantly.
@QPaysTaxes Sorry, you'll have to practice your anger management. (In the grand scheme of things, that's hardly an atrocity.)
9:16 AM
@200_success Aww okay
He is improving on self control, maybe from getting banned a few times, but nonetheless
@Quill Hey, one of those I asked for
Why don't you spew a few rainbows instead?
 10 sq 5 - .
@200_success What, like this?
9:19 AM
@QPaysTaxes I could write you some obfuscated Batch which would make your computer look for chat.stackexchange.com in localhost ^^
@Quill Hey, not cool
Factor is very pretty once you bother to learn it
@QPaysTaxes I'm learning it now :-)
@Mast Naw, I'm good
@Quill :D
@QPaysTaxes If you're the unicorn, then @EthanBierlein is the blonde girl
@Quill Sounds about right
9:23 AM
@QPaysTaxes { 1 2 3 } [ "The number is " write . ] each
@Quill Mhm
Is there a use-case for Factor or should it be considered an esolang?
@Mast ...It's definitely not esoteric
It's just concatenative
9:29 AM
...Holy crap, morning!
@Legato As others said, you should look into Socket programming. Whatever language you are using, I'm sure it has a tutorial about that. For Java for example, refer to docs.oracle.com/javase/tutorial/networking/sockets
Q: Clean phone number

HeeLProgram that cleans up user-entered phone numbers so that they can be sent SMS messages. The rules are as follows: If the phone number is less than 10 digits assume that it is bad number If the phone number is 10 digits assume that it is good If the phone number is 11 digits and the first numbe...

Q: Find anagrams in a list

HeeLWrite a program that, given a word and a list of possible anagrams, selects the correct sublist. Given "listen" and a list of candidates like "enlists" "google" "inlets" "banana" the program should return a list containing "inlets". Here is my solutions: class Anagram(word: String) { val sor...

Might be a good question for codereview.stackexchange.com - please check their help before asking there. — Neil Slater 56 secs ago
9:53 AM
@NeilSlater This code has been stripped down to a quite minimum example, which makes it a bad question for Code Review. — Simon André Forsberg 34 secs ago
@CaptainObvious I can't help but feel he's generating zombies.
call Donald, maybe he can shoot them
else I might go for them this weekend
@Mast I killed two of his
@QPaysTaxes One of his questions is still on-hold.
@Mast Which?
9:57 AM
Just as a general note, I'd recommend avoiding too many questions in a row, the reviews you get from one question can often be applied to other pieces of code you write as well. — Simon André Forsberg 22 secs ago
No, wait, I found it
@QPaysTaxes concerning that scala answer...
> I'm not that deep into scala semantics, but as I understood it, words is a modifiable reference collection. While filters do not have an effect on the collection reference, map might ...
@Vogel612 ...Hmm
I was assuming it'd work like Ruby
I don't actually know, but figured it'd be more java-like in that respect.
10:03 AM
@QPaysTaxes Why?
@Mast Because a lot of map implementations work like that
Also, why would you write a review so heavily based on assumptions? Are you sure your implementation is better?
@Mast It's a pretty likely assumption
...I dunno the right word to put there
@Duga That question is almost 2 years old.
Yep, looks like it's accurate
10:08 AM
Two years ago CR had a different status.
It isn't an exact review request either, more of a 'I don't understand this'.
Q: Count unique characters in a String and group the counts

HeeLWe take a string as input that must contain only 'A', 'C', 'G', and 'T'. For instance, "AACCC" should return the Map that looks like this: Map('A' -> 2, 'C' -> 3, 'G' -> 0, 'T' -> 0). More detail can be found in a gist with specs This is my solution: class DNA(code: String) { val nucleotides ...

Q: Does this code follow standard conventions, not redundant?

AlexanderIt's exercise from the java introductory book Write a hangman game that randomly generates a word and prompts the user to guess one letter at a time, as shown in the sample run. Each letter in the word is displayed as an asterisk. When the user makes a correct guess, the actual letter is th...

@SimonAndréForsberg He didn't take the hint.
Yup, assumption is accurate
@CaptainObvious VTC, UWYA
@Mast How so?
10:11 AM
@QPaysTaxes Proves it's working. I asked if you knew for sure it's better.
@Mast In other languages, it's a bit faster on large arrays because it does .toLowerCase once per item, not twice
I'd be surprised if it was different in Scala
...Right, it's past 6AM
I'm going to sleep
Night all
@QPaysTaxes As would I, but I don't know. So I'm not suggesting it without knowing.
@QPaysTaxes G'Night
Q: how to fetch Json data in iOS

anju kumbharkari am working on Ecommerce app in that i inserted my product details,now want to fetch that data from json ,how i code for it?? i tried that using if([method isEqualToString:@"GET"]){ NSString *getURL = [NSString stringWithFormat:@"%@?productDescription=%@?productid=%@?productimg=%@&...

@CaptainObvious Broken
10:33 AM
Would it be good if I attach link on free-image hosting with image of block-scheme illustrating logic of my program, because it's not obvious how it work or it's not necessary? — Alexander 15 mins ago
Yes, charts, more, please.
Q: Imposing a sort order on a query

Shelby115I've always been told "never use goto, there's always a better way" and for the longest time I just accepted it. Lately though, I've been running into such scenarios in which I have to repeat this bit of code every time I return early. I personally hate repeating myself, even the littlest bit of...

goto in . Uh, no.
11:16 AM
@CiroSantilli六四事件法轮功纳米比亚威视: that's not a valid close reason. Code review is not specifically off topic here. It could be too broad instead, at best. — Martijn Pieters ♦ 29 secs ago
Q: DataDictionary Application - Model

KaiFollowing on from my previous question, I think my Entity Framework model code is now complete. First I'll provide a quick overview of the program - everything above the next horizontal rule can be assumed to be 'fixed' & not changeable by me. Because this is kinda long, I'm going to break th...

@MartijnPieters I think code review is very close to "why isn't this code working?". Too broad or unclear are other options for this one though. — Ciro Santilli 六四事件 法轮功 纳米比亚 威视 48 secs ago
Q: DataDictionary Application - Controller

Kai This is related to DataDictionary Application - Model I haven't done much on the controllers yet, as it's the first time I've written Controller-type classes and wanted some quick feedback on really simple stuff, so these presently just contain various Get methods. If this is ok for a start,...

Q: How to avoid code duplication for collection of $_POST data?

Raphael RafatpanahI have a backend API that I'm sure can a refactor, but I'm not exactly sure how to avoid repitition between the store method and the update method of this controller. Specifically, the collection of $_POST data is exactly the same. How can duplication be avoided? store public function store(Req...

Q: Interval Validation

ambitiouzWe have three different web pages that contain grid which is for adding details of master entity. Grid is something like that: As you can see, detail object can be expressed in javascript by var detail = { Description: 'Detail', MinPercentage: 0, MaxPercentage: 20 } Now, we...

11:39 AM
@dyp I completely understand, and it's a very well made point. I still think it smacks of premature optimisation. When are we ever going to be assigning multiple copies of the same vector of expensive (copyable) objects in a tight loop? Code like that would be unlikely to make it past code review. I guess ultimately arguments like this over philosophy are just that - we all have good reasons for what we say. I think we're as correct as each other. — Richard Hodges 8 secs ago
11:54 AM
@Mat'sMug AppleScript is like talking to Siri with telegrams.

« first day (788 days earlier)      last day (2518 days later) »