« first day (661 days earlier)      last day (3356 days later) » 

12:00 AM
@Hosch250 Duga says Hello Reload.
 
Oh thanks but don't mind me, I'm just checking what's going on there
 
@Loufylouf Everything!
 
@SimonAndréForsberg OK.
 
@SimonAndréForsberg And nothing.
 
Didn't realize it was this late.
I DVLR'ed a while ago.
 
12:00 AM
Me neither.
I didn't DVLR at all.
I am considering going to bed.
 
The good thing about being on a Mac (although, right now I'm on my Ubuntu laptop downstairs), is that it's Unix based, so all of the command line stuff is basically the same as Linux.... and there's tons of good info about doing these command line programs.
 
Getting harder to do, now that I'm through the One Vote Short list.
 
Not as much good info about using Windows command line based programs. People don't use Windows command line nearly as much.
 
I wanted to review @skiwi's question, but that might have to wait until tomorrow (giving @rolfl or others the opportunity to answer...)
 
@nhgrif Why would I use the command line when I can do most of the stuff with a built-in program?
 
12:02 AM
@nhgrif indeed a big advantage.
 
The only thing I use the command line for is pinging servers and resetting my IP.
 
I never use the command line either.
 
Oh, I see.
 
Are pings supposed to make a sound?
 
I should try Ubuntu some time, but I don't really want to have to use the command line to set the computer up.
 
12:03 AM
@Hosch250 Let me help you out there: codereview.stackexchange.com/users/31562/…
 
@SirPython They can.
 
Some things are significantly easier on the command line (not many that I've seen though). Some things can only be done via command line that I have found.
 
@Hosch250 Ah, thanks for that. I forgot what they sounded like.
 
You don't have to use command line on Ubuntu...
 
@SirPython if you have the sound enabled (see top right, to the left of "all rooms")
 
12:04 AM
Oh, it comes with a built-in GUI?
 
Yes.
 
I've read that some don't.
 
Ubuntu does.
 
OK, that's nice to know.
I'm going to do the French Windows 10 preview first.
 
@nhgrif When your computer is in the kitchen and you have no monitor attached to it, you do.
 
12:05 AM
I want to learn French, so why not get a French OS?
 
But for example, I've yet to find a way to pull UDIDs off iOS devices plugged into a Windows machine.
 
@Hosch250 ve ve
 
I can do this on Mac/Linux though.
 
@SimonAndréForsberg But how are you supposed to have a 2nd monitor if you can't have a first?
 
@nhgrif Do you use an anti-malware suite?
 
12:05 AM
No.
I hardly browse any websites outside of StackExchange.
And almost all of my downloads are through Steam.
 
I've read that OSX is getting more popular for criminals now.
OK, no trouble there.
I just use Defender.
It comes with Windows, so why not?
 
@SirPython I have more computers.
 
I keep my second monitor in my taskbar as a window.
Really, it is just my VM.
 
That's the opposite of a second monitor.
That's two desktops on one monitor.
Rather than one desktop on two monitors.
 
Oh, I see.
Not the opposite, the inverse.
Very different.
 
12:10 AM
0
Q: YAuB - Micro Benchmark Follow-on

rolflFollowing some great advice here from Simon, I realized that I had over-engineered things, and that the Task builder methods were a horrible Java8 abstraxction. In Simon's words: "From a usability perspective, this is a bit weird...". After messing with things a bit more, the original use-case l...

 
@rolfl I just read the latest commit you did on github, I like your solution, even if it leads to some duplicated code.
 
I think I will take this one quite seriously (the UBench....) it has potential.
It is simple, but useful....
Do the whole hog thing, put it in maven, etc.
Anyone doing performance tuning at an iterative level, would love a tool that allows such activities.
A single file you can drop in some code base, or a simple maven dependency....
 
huh?
 
yes!
@rolfl Now I will be torn which one to use though, yours or @janos'
 
Mine has the advantage of being Java8 friendly... ;-)
In fact, Java8 dependent.
 
12:16 AM
I believe janos' is too.
but that's okay. For tests and benchmarks and stuff, I use Java 8.
I only use Java 6 for Android... and I am not very interested in benchmarking as much there.
 
Janos's relies on annotations... a different strategy entirely
 
indeed
I see many advantages of yours now.
Your tool would be much easier to do "parametrized" benchmarking.
Like when I wanted to benchmark my N-Queens solver.
that wasn't nice to do with @janos' library :/
 
Yup, and I would use it again, and again, and again when answering questions here.
THere's the OP's code, and I want a solution that does things faster ;-)
I want a comparative benchmark.
 
0
Q: Hangman program in Java

Calculus5000Here's an implementation of Hangman using Java 6. I've split the code into 2 classes - a logic class & a gui class. Is it ok to have so many static member variables? Please let me know if there are any design improvements that I could make. Hangman logic - main class import java.awt.*; ...

 
12:22 AM
although that would be possible with janos' library as well, I find that your library would be even easier to use for that.
 
And you get snarky users saying things like:
I'd love to see you discuss the drawbacks of reading the whole file directly into memory when you propose such a heavy change in the way content is processed. Also these regexes look like you're overly complicating the initial problem :( — Vogel612 Feb 18 at 23:30
;-)
 
lol, yeah that @Vogel612 can be snarky ;) (JK, Vogel!)
 
I have to run.... kid duty. I am very interested in feedback, again... ;-) Part of the problem is my limited experience with Java8, and missing the 'idiomatic' approach... I think your suggestions lead down the correct path, though
 
See you.
I think I have the requirements for Sportsmanship fulfilled.
 
See you
I think I have the requirements for going to sleep fulfilled.
TTGTB
@skiwi's code will have to wait.
 
12:27 AM
> Meta-tags, like [beginner], [subjective], and [best-practices], are not helpful by themselves – they do not communicate anything about the content of the question.
...
> For example, the meaning of the tag [subjective] is, itself, subjective; the same is true for tags like [best-practices] and [beginner]. Best practices to whom? Beginner by what criteria?
Our help center suggests we shouldn't be using . I tend to agree...
 
I agree too.
I don't support misspellings.
Oh, edited.
With the misspelling, I'm still on the fence, but leaning against.
 
12:44 AM
0
Q: Custom CMS Inquiries 'MVC, Bootstrap, Factory'

ICJBefore i get started i feel i need to list the following. I am not looking for an existing DI or Framework this is a personal project to shift from procedural to oop programming. Tear this apart, i am trying to learn the latest best practices i do not want to be stuck creating broken code for ...

 
Argh I've been struggling the entire day with a query on SEDE. I'm almost there but there seems something off <,<
 
I wonder what base-3 programming will be like.
We won't have true/false anymore.
Will it be true/maybe/false?
 
10
A: Help spot deficiencies in our Help Center

Pimgdhttp://codereview.stackexchange.com/help/tagging Regarding tagging... Each question may only contain 5 tags at a maximum, so choose the ones that best describe your question. "Please fix my duplication" -> duplication Could we change this to "that best describe what your code is about." T...

 
@Hosch250 true/ 30ShadesOfGray /false
 
Something like that.
@200_success What about it?
Oh, it is a reply.
 
12:50 AM
Help center pages are up for discussion.
 
Yes, I see.
 
@Mehrad Finally you get the format ;)
 
I didn't realize you were replying.
 
@SirPython never stop until I get it right :D
 
@Hosch250 What's this in reference to exactly?
 
12:52 AM
@SirPython Only the formatting deserved a star ;P
 
@nhgrif I'm not sure if I'm a lunatic or a genius.
 
We know that help center pages in general are out of touch with reality.
 
Trying to figure out what base-3 programming will be like.
 
Why?
 
I don't know.
I 'm also curious about base-N.
 
12:53 AM
We don't exactly have base-2 programming today.
 
0
Q: Line passing the most number of points

giulioGiven points on a two dimensional graph, find a line that passes the most number of points. Any comments please? import static org.junit.Assert.*; import java.util.*; import org.junit.*; public class Solution { public class Point { double x_coord; double y_coord; public Point...

 
@200_success Do you think we should mention beginner programs that can be both useful and helpful?
@nhgrif Really?
 
@DJanssens Anything I can try to help with?
 
It's more like base-512 really. You can't reference discrete bits individually. You can't access anything more specific than a byte.
 
let me try somethings more first @Phrancis
 
12:54 AM
Ok
 
Well, that is on the hardware side.
 
Not entirely.
 
Maybe, if it doesn't make the help center page too long-winded.
 
In our languages, we use base-10.
A boolean is base-2.
 
Because we have 10 fingers.
 
12:55 AM
Sort of, that is.
 
A boolean has two states, two possible values.
It's not base-2 though.
 
Yeah.
 
A boolean isn't a number. It's not something you can count by.
 
I think that for computers to really become sentient, they need to have true/maybe/false.
 
@nhgrif toes are accessible the same amount. Why not 20? I bet when they started this, people didn't wear closed in shoes !
 
12:56 AM
Why?
 
@Hosch250 you might enjoy this en.wikipedia.org/wiki/Qubit
 
You think bits need 3 possible values?
 
People don't think in true/false.
 
@Mehrad Counting on your toes is difficult and probably not very socially acceptable.
 
They think in true/maybe/false.
 
12:56 AM
I repeat my question: why does the computer need to have bits that think like people.
 
@mjolka Bookmarked.
I didn't say they have too - they obviously don't have to.
I said to become sentient, they do have to.
 
@nhgrif since we never did it makes it => difficult & socially unacceptable (to a degree)
 
I'll bet that the way individual neurons are activated is very different from the nature of thought.
 
The only advantage you would gain if an individual bit could hold 3 states is that you might get more available memory...
 
Personally, I would be scared of a sentient computer.
 
12:58 AM
But you can use two bits to represent yes/no/indeterminate.
 
@200_success Well, true.
@nhgrif Well, yes.
 
One bit represents determined or undetermined, the other represents true/false. The true/false bit only matters if the determined bit is on.
 
@nhgrif 1/null/0 ?
 
And plenty of languages like Swift, and VB have "optional" values which are exactly 3-state. True/False/No value.
And SQL bit columns can allow NULL value.
So that's 3-state as well.
 
12:59 AM
You can set null in every language.
 
@nhgrif Oh 2 bits... don't need to explain anymore
 
You can't set null in every language...
And setting null is not the same as an optional variable.
 
Really?
 
Well, not exactly.
 
Well, LOLCODE doesn't let you.
But, you don't consider that a language.
 
1:00 AM
C doesn't have a bool. But in most languages, bool and other primitives are actually primitive data types.
 
@nhgrif Yes it does.
 
That means that the actual value is right there in stack memory.
 
You can have null-able Boolean in C as well bool? Foo = null
 
No it doesn't.
 
Recent versions of C have a bool.
You need to include it in a header file, though.
 
1:01 AM
Perhaps, but nonetheless.
The real point is primitive data types can't be null in a lot of programming languages.
 
Not sure about bool, but every other primitive type can be in C++/C# as far as I know.
 
So does the WPF checkbox has 3 states :)
 
Except that null is essentially the same as 0... but 0 and null aren't the same thing.
 
@Hosch250 What qualifies something as a programming language, then?
 
You can't set primitives to NULL in C++.
 
1:02 AM
@Mehrad Not quite.
 
The only way is if the language supports optional variables.
 
null == non existent in a Checkbox.
 
@Hosch250 check it yourself
@Hosch250 isn't that the 3rd state?
 
Non-existent is not a state.
 
Checkboxes commonly support indeterminate. In Windows apps, usually it's empty/checkmark/box
Where the box means in-determinate (neither checked nor unchecked state)
 
1:03 AM
@nhgrif The only time I've seen the box used is when you choose only some suboptions.
That does not imply non-determinate.
 
@Hosch250 Just stop. Okay.
 
It only means partial true, partial false.
 
You can set up a checkbox to allow 3 states.
 
"IsThreeState
Three

The CheckBox optionally supports three states."
 
Not sure where this conversation is going. It seems to be a rather empty debate about terminology.
 
1:04 AM
Okay, yes.
 
Read this first:
 
In logic, a three-valued logic (also trivalent, ternary, trinary logic, or trilean, sometimes abbreviated 3VL) is any of several many-valued logic systems in which there are three truth values indicating true, false and some indeterminate third value. This is contrasted with the more commonly known bivalent logics (such as classical sentential or Boolean logic) which provide only for true and false. Conceptual form and basic ideas were initially created by Jan Łukasiewicz and C. I. Lewis. These were then re-formulated by Grigore Moisil in an axiomatic algebraic form, and also extended to n-valued...
 
One click changes it from empty to check, next changes from checked to box, next changes from box to empty.
 
@Mehrad Concede the point.
 
1:05 AM
If this is a filter in a grid, the box will show all rows.
 
Could I get some opinions on the topicality of… ?
0
Q: Number processing slower with asm.js

GameAlchemistI did a few times ago what I called a plasma in plain JavaScript: jsFiddle The idea is to use 2 oscillators (LFO) which have their frequency + phase driven by two oscillators each. Then we use those 2 main oscillator output to decide of the r, g, b of each point. To test the quite new API as...

I think it's allowable.
 
@200_success That image is something awful.
That is the closest I've been to a seizure in my entire life.
 
Seems fine to me @200_success
 
Looks like working code to me.
The question, I don't know.
 
In Swift:
 
1:08 AM
Yes, it's working. The issue is whether it's code review or code understanding.
 
var hasTwoStates: Bool = true
var hasThreeStates: Bool? = nil
The first variable can only be true or false. You cannot set it to nil. The second can have true, false, or nil.
 
**Concede**: admit or agree that something is **true** after first denying or resisting it.
I would when you find a word which agrees to Maybe ;)
 
Feature request:
Don't ping me when a message is edited.
 
In C++:
std::optional<bool> hasThreeStates;
 
@Hosch250 That would be nice indeed
 
1:10 AM
Sure would.
I knew you would ping me twice.
 
But in C++, bool b = false; can't have 3 states. It can only be either true or false.
 
@nhgrif bool? b
 
Seriously though Hosch maybe you should request it on Meta.SE, I feel sure you're not the first one to get annoyed by notice it
 
The syntax is std::optional<bool> b as far as I know.
But I'm not a C++ programmer.
 
@Phrancis Later.
 
1:12 AM
In Swift, it'd be: var b: Bool?
 
@Phrancis I'd say there is an intention behind it. You are getting pinged for some new message literately which might not carry the same meaning.
 
@Mehrad I've never seen the message change substantially.
 
That might indeed be
 
It gets really old when you get pinged 4 times for one message.
It isn't by design.
 
Just turn the sound off?
 
1:14 AM
I still get the banner.
 
turn the banner off :)
 
Then I won't get the ping when I'm not watching the tab.
I don't have a 2nd monitor, you know...
 
There's a difference between int? i = null; and int i = null; I don't know if the latter is legal in C# (to assign an int to null but you can do something similar in VB.NET, I believe).
 
You got he point @Hosch250. I type fast and I do edits a lot. and lots of them aren't that big of a difference in the overall meaning. but sometimes they can be
 
Arguably, a non-optional should never be null.
And actually, Swift enforces this. Only optional types (even reference types (classes)) can be assigned to nil.
 
1:18 AM
@nhgrif Cannot convert null to 'int' because it is a non-nullable value type if you do the second one.
 
I don't even see how this is relevant to answering a question:
> Saying “thanks” is appreciated, but it doesn’t answer the question. Instead, vote up the answers that helped you the most! If these answers were helpful to you, please consider saying thank you in a more constructive way – by contributing your own answers to questions your peers have asked here.
 
I see.
 
This is very SO-ish:
> Still no answer to the question, and you have the same problem? Help us find a solution by researching the problem, then contribute the results of your research and anything additional you’ve tried as a partial answer. That way, even if we can’t figure it out, the next person has more to go on. You can also vote up the question or set a bounty on it so the question gets more attention.
 
@nhgrif afaik, you can null the instance in initiation if it's a reference type not a value type. and if value type you gotta go with the null-able version with ? mark
 
And this:
> Read the question carefully. What, specifically, is the question asking for? Make sure your answer provides that – or a viable alternative. The answer can be “don’t do that”, but it should also include “try this instead”. Any answer that gets the asker going in the right direction is helpful, but do try to mention any limitations, assumptions or simplifications in your answer. Brevity is acceptable, but fuller explanations are better.
 
1:20 AM
Comparitively, Swift would disallow: var object: MyClass = nil <-- object is of type MyClass, not MyClass?. It's not an optional type, so it can't be nil.
Even though MyClass is a class and object is a reference type.
 
@200_success Can I pretty much change the posts as needed to suit CR?
 
interesting. Never done Swift
is it the flash language ?
 
No.
 
Or, should I post every idea on the other meta question?
 
It's Apple's new language.
 
1:22 AM
Somehow, I had something related to flash in mind. Maybe I am confusing it with a software of something. Thanks
What was the Old one ?
 
Objective-C?
 
@Hosch250 This is relevant because sometimes people confuse SE with a forum and "reply" to answers with an answer.
@Mehrad Objective-C is the other one. It's "old" I guess, but it's not going anywhere.
 
Hello.
 
@nhgrif I agree there should be something, but even more clear that it is unacceptable.
Something about how those answers will be removed.
 
Well this Swift look really different. at least from the little samples you posted
@MannyMeng Hi :)
 
1:23 AM
I guess.
 
Hello.
 
@MannyMeng Hi :)
 
You said hello twice and I replied twice :(
 
@Hosch250 What doe you mean by "change the posts as needed"?
 
1:25 AM
Hello.
 
Oh...
 
FizzBuzz in Swift is kind of neat:
func fizzBuzzify(value: Int) -> String {
	switch (value % 3, value % 5) {
		case (0,0): return "FizzBuzz"
		case (0,_): return "Fizz"
		case (_,0): return "Buzz"
		default: return String(value)
	}
}
 
Some of the sections are very SO-ish.
Can I make them more CR-ish, and if they are bad, it can just be rolled back, or should I post each point on the other meta question?
Or maybe, I should write my own version and ask as a separate question on meta?
 
on which post?
 
How do I write a Good Answer.
 
1:28 AM
Be smart.
 
1
A: Let's draft better Help Center pages!

200_success The Help Center page and its Deficiencies How do I write a good answer? Thanks for taking the time to contribute an answer. It’s because of helpful peers like yourself that we’re able to learn together as a community. Here are a few tips on how to make your answer great: Pay it forwa...

 
Go for it. If we don't like what you drafted, we'll know it was you who wrote it. =)
 
OK, thanks.
 
Thanks in advance for helping.
 
Glad to help.
I learn so much here.
 
1:30 AM
♪ mergin' mergin' mergin', keep those commits mergin' ♪
 
"Is there anything worse than having your dad fight your battles for you?" "Yes! Having your dad lose your battles for you!"
4
 
@200_success Do you have the question handy (from meta) asking about answering questions, where you responded that any short, justified answer is fine?
Can't find it.
 
19
A: Short answers and code-only answers

200_successI'd like to describe what I would like to see on this site, rather than the current practice. As noted in Answering Guidelines (answer length), there is a desire for cultural change on this site. Allowing shorter answers should improve the answer rate by lowering the barrier to contribution, an...

That one?
 
No.
 
1:37 AM
Yes. You must have a 57x57 icon... otherwise it wouldn't have shown you the error. Also, you have to support the iPhone 5 display. And probably the iPhone 6 for good measure. — nhgrif 54 secs ago
 
The one where you linked to your answer as an example.
 
"I got an error saying I don't have a 57x57 icon. Do I have to have a 57x57 icon?"
Yes... idiot.
 
12
A: Java programming samples

200_successAs stated on our tour page, Code Review is a question and answer site for seeking peer review of your code. It's built and run by you as part of the Stack Exchange network of Q&A sites. We're working together to improve the skills of programmers worldwide by taking working code and making it ...

 
This is odd...
body {
    font-size: 120%;
    font-family: Verdana, Geneva, sans-serif;
    background-color: #2E2E2E;
    color: #BCBCBC;
}

	/*
	** bunch of other unrelated stuff
	*/

/* FORMATTING FOR COMMON PAGE ELEMENTS */

h2, h3, h4, blockquote {
    font-family: Georgia, Times, "Times New Roman", serif;
    color: #EEEEEE;
}

p, span, table, ul {
    font-size: 1.2em;
    font-weight: normal;
}

	/* in the HTML file... */

        <ul>
            <li><h4><a class="csh-bypass-link-color" href="factions.html" data-th-href="@{/cyborg-chronicles/factions}">Whose side will <i>you</i> stand on?</a></h
 
By the way, you don't have to be a programming expert to write a Code Review answer. Any concrete suggestion for improvement is welcome, if you can justify it. Here is a simple answer I wrote yesterday. — 200_success ♦ Jan 22 at 11:38
 
1:38 AM
Yes, thanks.
Great.
No wonder, that was a comment, not an answer.
 
If I switch to <h3> instead of <h4> it properly displays as font-family: Georgia, Times, "Times New Roman", serif;
Wonky CSS
 
So something is overriding your h4 style?
Is that your entire stylesheet?
 
Apparently...
It's not, though it's the only instance of h4 (or h3) in the CSS. But, it's not impossible it could be related to the Bootstrap CSS I also link to... but why one and not the other lol
 
@Phrancis the chrome or firefox dev tools should help you track down the problem
 
Web developer tools in Chrome / Safari / Firefox will tell you why.
 
1:42 AM
Yeah I guess I'll have to fire those up
 
Rules based on a selector that is just the name of the element have low priority.
 
I'll have to admit, putting a header tag inside a list element feels like I should be finding a smarter way to do this
Think I'll make a class for <li> instead and stop fudging around using stuff where it's not meant to be used
 
Anyone good with /bin/sh?
 
@Jamal Maybe. Depends what you mean by "good".
 
1:50 AM
It can be improved, but it is a start.
 
I'm having to write a script that determines if a file exists in the current or a parent directory.
 
I cut several sentences I didn't think really applied, you may want check that.
 
I think a more drastic rewrite may be in order.
 
Yes, I forgot about the points brought up in the other question :(
Adding those now.
 
0
Q: jQuery UI tabs: navigation thru tabs using active options

SaeedI am using jQuery UI Tabs for a web application and I would like to navigate thru different tabs with these four buttons: next-tab: takes you to the next tab prev-tab: takes you to the previous tab preview-btn: takes you to the preview tab (a specific tab or the last tab) back-btn: takes you to t...

 
1:57 AM
@Jamal What have you got so far?
 
By "a parent directory", do you mean the parent directory or an ancestor?
 
"in the current or a parent directory"
 
I'm confused by the use of the indefinite article.
 
I presume this means given: /path/to/the/directory/, that the file exists in /path/, /path/to/, /path/to/the/, or /path/to/the/directory/
 

« first day (661 days earlier)      last day (3356 days later) »