« first day (625 days earlier)      last day (3393 days later) » 

6:01 PM
Should I create a tag wiki for ?
Or, is that something we might want to kill?
 
A more analogous hypothetical would be: if I was asking a question about how to go through a tree by unrolling the stack, and not using recursion, would it be fair to tag it with recursion?
 
0
Q: Algorithm used in Java

Ana DuroI have created a Java program. Can anyone help me change it to a simple algorithm without using java codes. I mean not executable in Java. public class Test { public static void main(String[] args) { int [] a = new int [4]; for (int i =0; i<a.length;i++ ) ...

Yeaaaah.... that's descriptive
> Words used in Title
 
Definitely off-topic.
 
0
Q: Algorithm used in Java

Ana DuroI have created a Java program. Can anyone help me change it to a simple algorithm without using java codes. I mean not executable in Java. public class Test { public static void main(String[] args) { int [] a = new int [4]; for (int i =0; i<a.length;i++ ) ...

 
@Hosch250 IMHO might be synonymized with ? I don't feel a distinction is particularly useful...
 
6:09 PM
Yeah.
I wrote a wiki, but I have the rep to merge it too.
 
@Hosch250 It's a popular genre of programs for beginners to implement, and therefore deserves a tag. Add a tag wiki if you think it's meaning is not obvious.
 
I added a tag wiki.
I did not merge it.
It is clear enough, but having a wiki looks nice.
 
It makes it easier to find other questions that attempt the same problem.
 
Fair enough :)
 
I'm doing a wiki for right now.
 
6:11 PM
> please no block question
how cute
 
What's the Java operator for "to the power of"?
 
Math.pow, I think.
Math.pow(val, power).
 
@Hosch250 it was created not so long ago.
12
Q: Game tag - When to create own tag for games?

Simon André ForsbergI have just created the minesweeper tag and the rock-paper-scissors tag. The reasoning for this was: Rock Paper Scissors (Lizard Spock) is popular enough to deserve it's own tag. (37 questions seem to be applicable for it) Minesweeper has seen some questions (posted by me) not directly related...

 
I don't think this is an actual operator for it.
 
I still try to use ^ sometimes thanks to high school
 
6:19 PM
I did at first too, but I found that almost no languages, and non that I use, have a power operator.
^ could sure create some interesting bugs, though.
 
error: incompatible types: possible lossy conversion from double to int
      	int var2 = Math.pow(var1, 8);
      	                   ^
 
I do all my programming on a TI-83
 
That's a new one on me. Should I use doubles instead of ints for this?
 
Apparently.
Not all powers are ints, you know.
 
Sure enough
> var1 is 1024.0
var2 is 1.2089258196146292E24
Maybe I should use smaller numbers ;)
 
6:21 PM
Sometimes it isn't possible.
Is var2 some scientific constant or something?
 
0
Q: Promise .then .catch

NoitidartI wrote this example of IS.File.directoryIterator for firefox: https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/OSFile.jsm/OS.File.DirectoryIterator_for_the_main_thread#Example.3A_Iterating_through_all_child_entries_of_directory Can you please help me to review it so if a...

 
Looks like it
 
I think it is 2^80.
 
quick, somebody remember how to do a logarithm
 
1208925819614629174706176
 
6:24 PM
Well using numbers that a human can understand, Math.pow() works great!
 
Get a calculator.
OK, I know logarithms somewhat.
 
I have my trusty TI-83 right here
 
I had one of those in high school, like almost 2 decades ago
No idea what I did with it lol.
 
I have a TI 36X II.
Used it on my ACT a couple years ago.
 
But I have Calculator.exe doesn't that count? ;-)
 
6:26 PM
I have that too, fourth item on my taskbar.
 
Just noticed it has scientific and programming modes, nice
 
Statistics mode too.
 
ah. we had to have graphing calculators in high school
to play bomberman on
 
I have an ancient one.
Don't know where it is at the moment :)
Anyone want to pick up some points towards Reviewer/Steward?
 
Ha, I've got a TI-84 Plus
though haven't used it in years
Well that's not true, probably used it in exams occasionally last years
 
6:35 PM
My Unix professor actually encourages use of sites like SO for assignments (and by extension, perhaps, U&L). Bring on the homework questions...
 
I used SO a little, but I was almost always told to RTM.
This was Java.
I wish I could take programming classes...
 
Have professors embraced students writing good code in lieu of whatever API functions they decided to introduce that week more?
2
 
My professor required that:
A: We write pseudocode before we begin the assignment.
B: We comment almost every line of code.
I got around it by:
A: Write the code.
B: Add the comments.
C: Copy/paste the code into Word, delete the code and leave the comments.
He never knew the difference :)
 
The syllabus says that the textbook is optional, too. Finally, a professor who gets it.
 
My management professor is a model professor.
 
6:39 PM
I don't think you can learn coding on university really
 
I could get behind an approach that was more like "if you know something more, feel free to use it, but comment with pseudocode or an explanation of some depth to show me why you know this is a superior solution"
 
On the other hand, for people without experience it could be an eye-opener
 
as opposed to "Oh we haven't learned that yet"
I think it's very hard for students who are used to doing things ilke rolling their own parser to admit that >90% of the time the answer is "let the framework do it for you, and better"
because they're simply used to doing a deep dive and questioning almost every aspect of the project they are working with
 
7:07 PM
0
Q: Optimissing a 1D convolution in Haskell using Data.Vector

onewayAs part of some code I've written, I needed to perform a 1d convolution. This convolution ends up happening quite often, so I wanted to optimise it (in some way other than using a fft, though I could do this if necessary). I expect that my convolution kernels will be ~100, and the vector they are...

 
Does this simple Java class make my ass look fat? Trying to uber-beginner code still trying to figure out where best to put declarations vs. computations...
public class PowerOf {
  private static double base = 8;
  private static double exponent = 3;
  private static double result = Math.pow(base, exponent);

  public static void main(String args[]) {
    System.out.println(base + " to the power of " + exponent + " equals: " + result);
  }
}
 
In this simple case, why make variables?
 
@HenrikBohlin posted a second question!
0
Q: A grid and a menu walked into a program

Henrik BohlinA program that creates a grid 10x10 and assigns a random number in each tile. It then asks you if you vant to create a new grid, view the current one, count how many of each nummber there is in the grid, sum the rows, sum the columns or exit the program. import java.util.Arrays; import java.util...

 
@Hosch250 Should probably make them constants huh?
 
Well, I mean, just hard code them - they are hardly used.
 
7:10 PM
(I was the one who suggested the title btw)
 
In a bigger program, yeah, make variables/constants.
 
@SimonAndréForsberg That's a great title!
 
Monking!
 
Hi!
 
@HenrikBohlin Hey! Nice question there :)
 
7:14 PM
oh thank you
I can imagine there is a lot of things that can be improved :3
 
The one time I need that annoying Google Translate extension to translate a page, it's nowhere to be found
2
 
2
Q: A grid and a menu walked into a program

Henrik BohlinA program that creates a grid 10x10 and assigns a random number in each tile. It then asks you if you vant to create a new grid, view the current one, count how many of each nummber there is in the grid, sum the rows, sum the columns or exit the program. import java.util.Arrays; import java.util...

 
try googleing "google translate"
 
@CaptainObvious Low rep user gets the importance of an awesome title.
 
10 mins ago, by Simon André Forsberg
(I was the one who suggested the title btw)
 
7:21 PM
that's one to remember for "Best of Code Review 2015 - Best Title Category"
4
 
@SimonAndréForsberg LIAR!
 
Boy, what do I do with these Moderator tools?
Just leave them alone?
 
@Hosch250 look at 'em every once in a while ;)
 
For those editing wiki's, consider cloning the contents from the matching tag on Stack Overflow. It is often a good starting point for a Code Review version of the tag
 
7:23 PM
@rolfl OK.
I'll remember.
 
Congrats on 2003 !!! ;-)
 
Thanks.
 
@Hosch250 LOL. I did for a long while, but there's some interesting info in there. Mostly that's what it is. Information.
 
OK, I can see all the awful posts now.
7
 
well you could get most of the information in other ways
but the tools get it all into one place
 
7:26 PM
Yeah, and it doesn't have the limitations of SEDE, the moderator tools have "live" data.
 
I wish there was a way to completely remove the junk.
It would make the site a lot cleaner looking.
 
There is... one junky thing at a time :)
 
Really?
 
@Hosch250 offer bounties for 1500 rep, the junk will magically fade away ;)
 
Why can't I post the same comment twice?
I said Really?
Then, I tried to say Really? again, and it wouldn't.
 
7:28 PM
really?
 
Yup.
 
feature
 
Yeah.
 
Yeah.
 
I just tried it again with Yup.
 
7:29 PM
I just tried it again with Yup.
See how annoying it would be?
 
See how annoying it would be?
2
 
Well that isn't what I was doing.
I responded to Phrancis.
Then, I tried to respond to Mat's Mug.
 
then use the reply feature
 
You can just add a space ... no, you can't.
 
OK.
 
7:30 PM
when you hover a message
 
Oh, you can't.
 
@Vogel612 I know how.
 
oh kk, nvm then
@rolfl really?
 
I think it might be to counter double-post bugs when there's a network glitch
 
@rolfl really?
@rolfl really?
 
7:31 PM
@Mat'sMug I see.
 
^^ I'd say it works
 
^^^ respnded to two different chat posts of mine.
 
which is the magic behind it
 
Is it true about the 1500 bounty?
I suppose the bounty hunters don't want to see it.
 
@Hosch250 well if you're at 2K+ and offer bounties for 1500, do the math ;)
with 500 points you no longer see the deleted crap
 
7:32 PM
Oh...
 
lol
 
Nope, if it really worked, I'd do it once I reached 21,501.
 
but when graduation kicks in, moderator tools will become 10K+ anyway
 
Yeah.
Anyway, I hit the big point, so now 3k and I'll hardly lose any privileges.
 
aside from being able to delete the junk...
and seeing it ...
I should get another 2k...
 
meh..
I am not really actively answering around here anymore
 
Same here, but still gaining points from time to time
 
I see loads and loads of questions
and most of them simply aren't interesting enough to warrant an answer
 
I'm killing old zombies, and gaining Reversals.
 
I struggle with not feeling like wanting to say the same basic things over and over again
3
 
7:36 PM
Only 75 rep until my rep will equal my ID number. :D
5
 
New users..... in chat. That's what I like.
 
@skiwi stargreed
 
@Vogel612 Well if it's getting a star, then I might as well fix that typo!
 
I have found that too... to a large extent.
 
If the same points apply, is it time to close as duplicate?
 
7:38 PM
No, not at all.
 
It's always the same: naming, responsibilities, getting better at using standard APIs
 
No, they are not duplicates at all
There'll always be new users posting those questions and other users wanting to post answers to those questions
 
Maybe we should make a standard post covering those and just link that?
 
@Hosch250 it might be possible to close the exact same code as dupe.
but aside from that....
@Hosch250 impossible
also not the point of CR
 
Why?
 
7:39 PM
while there is some core concepts not every poster is guaranteed to understand them
there's many people around here at very beginner level asking questions
 
@Hosch250 that was tried before
 
OK.
 
ohh right that was a thing of yours, @Mat'sMug
 
The value of Code Review is that the answers are tailored to the specific question. To a particular person at a particular place in their skill decelopment, and for a particular piece of code.
That is hard to duplicate
 
Yeah.
 
7:42 PM
@rolfl except I predict we'll start seeing dupes pretty soon ;)
 
Possibly, but finding the target of the dup will be hard ;-)
 
yuuup
 
Does Community check for identical dupes?
 
nope..
how would you do that?
 
Just compare the code. If the code is identical...
 
7:44 PM
it's simply not valuable to run a question as a full-text search against the database...
because you're losing waaay too much for too little benefit
 
Yeah, but it actually does something when you are writing it.
It somehow gets similar questions, and I've been able to not post on SO because of it.
 
ya that's some basic filters to keep most carp out of the system
 
The more I think about it, and as much as I think line numbers would be/look nice... There are a few obvious drawbacks that may be more trouble than it's worth... Perhaps we should leave well enough alone? — Phrancis 10 secs ago
 
ohh the search. Yea that is awesome
 
@Vogel612 Donét let the carps get inside!
 
7:45 PM
monking @all
hey @SimonAndréForsberg you were looking for me earlier?
 
Good monking.
 
If @all could take a minute to look over the comments on that answer, and DV if you agree the drawbacks are not worth it
 
@Hosch250 "been able to not post on SO"... it is really something positive, isn't it?
 
Yeah, it is.
You never know which way the votes will go.
2
 
@janos yeah I had some Spring MVC issues, but I got some help from @Marc-Andre. (having some other Spring MVC issue now that I am locating...) You know a bit about Spring, right?
 
7:47 PM
hmm... @Hosch250 I disagree
 
@Hosch250 I have to agree
 
only parts of Spring, not MVC
 
@SimonAndréForsberg you might want to talk to Itachi Uchiha the Java Room's local Spring expert
 
@janos you know anything about Spring Security?
 
I edited the drawbacks into the Line Numbers answer
 
7:49 PM
@Phrancis the second drawback is imo invalid
see my comment there.
 
thanks for the tip, @Vogel612
 
@SimonAndréForsberg nope, I only know core + jdbc + some testing features
 
@Vogel612 I changed the wording a bit
 
I should definitely learn more
6
 
It also applies to snippets of code, line numbers restart at 1
 
7:53 PM
maybe there could be something like a flag in the language declaration??
you know you can change the highlight language in a html-comment in the post, right?
it might be possible to define starting numbers &| visibility in these comments
 
@janos yeah, Spring is a lot to learn about. Although I do find the configuration part of it a bit annoying at times whenever something doesn't work.
 
This is the best answer: puzzling.stackexchange.com/a/7989
 
I just took over a coworkers former project. Among other things, I am supposed to rewrite a "Xor" out of it...
 
Why can't you use a XOR?
 

« first day (625 days earlier)      last day (3393 days later) »