« first day (677 days earlier)      last day (3342 days later) » 

10:13 AM
@DrewDormann As far as I have understood I cannot yet vote for migrating the question due to small reputation. If anyone having enough reputation could vote for migration to (codereview.stackexchange.com)[codereview.stackexchange.com] I would be happy! — Marcel 8 secs ago
@GertArnold CR has officially graduated, but waiting for a new design and stuff. Even after CR graduates, with the number of bad suggestions to post there, it is still not certain it will be a migration target. And about voting to close as off-topic...Simon André Forsberg 8 secs ago
 
hey
 
hey @skiwi
 
10:28 AM
I want a CR mug
:(
 
get to the first page!
And Monking!
 
160 places to go :(
 
0
Q: Multiple if - Filtering

Tech JerkBased on dropdown value and search text I need to filter a list and return Method 1 if (selectedValue == 1 && searchTerm.Length == 0) return users; if (selectedValue == 1 && searchTerm.Length > 0) return users.Where(...some condition based on searchTerm...) if (selectedValue == 2 && searchTer...

 
hey @SimonAndréForsberg
 
@Heslacher I think that question should be closed for being example code, even if he added in the implementations of the returns
 
10:34 AM
I am unsure it is about showing a different way, where the op already tried to refactor. I will wait a few minutes and if he posts the details I will check it again. Otherwise burn it ;-)
 
@DanPantry what did you say about a CR mug? :D
 
I want one :(
I saw something on the graduation post
thought "Oh, I'm probably in the top 50"
NOPE
216th
 
top 50 by grad time is not out of the question
Monking all, BTW
 
When are we graduating? :P
monking
 
10:39 AM
monking @rolfl
 
hey @rolfl
 
@Dan, if it is more than 2 months away, you can make the front page before.... ;-)
 
This answer could use some upvotes:
1
A: Let's play some Swift Poker

QuuxplusoneBearing in mind that I don't know much Swift... Your Rank enum could save you a lot of typing if you simply made it a plain old autoincrementing integer enumeration: enum Rank: Int { case Ace = 1, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten, Jack, Queen, King, __EXHAUST } exte...

 
Not if I want to keep my job I can't @rolfl :P
 
I am editing... please stop the down votes :( — Tech Jerk 4 mins ago
@DanPantry ^^^^
 
10:41 AM
Also, I've downvoted this question but I don't believe it's necessarily off-topic:
-1
Q: Count the number of element in arrays inside root array

TchiI have an array of Rooms objets. Each room contains an array of Student object. So I want to get the sum of the number of students in all rooms. So what I'm doing is : self.rooms().map({ numberOfImagesToDownload += $0.students.count }) Is there another modern/intuitive way to do it or that's...

 
I really have a love-hate relationship with JavaScript inside Java/Nashorn
JSGame.prototype.__noSuchMethod__ = function() {
    var IllegalStateException = Java.type("java.lang.IllegalStateException");
    throw new IllegalStateException("Method " + arguments[0] + " does not exist on JSGame");
}
 
Wat
That's some mighty "interesting" Js code :P
 
0
Q: Consuming an API with authentication

Ben FortuneI have created a library which consumes the Imgur API. This is the main file. var request = require('request-promise'), fs = require('fs'), path = require('path'); var Imgur = function(options) { this.options = {}; if (typeof options.clientId === 'undefined' || !options.clien...

 
I don't think this is necessarily off-topic, but I also don't think it's all that great of a question for CodeReview. There's not really that much code to review. You don't really mention what, if anything, you think is particularly wrong with this, and you don't mention this being particularly slow or anything. I think it looks fine and you've given no context. CodeReview questions work better with quite a lot more code to look at. — nhgrif 23 secs ago
 
@DanPantry Yep it is
 
10:47 AM
BREAKFAST (sorry, that was my stomach).
3
 
I'm programming DSL language support into JavaScript/Nashorn
Making something similar to extension methods, kind of ;)
Only small issue is that the build on Travis CI breaks at the moment
It works on my machine though
My only lead so far is that I'm on Java 8u20, and Travis is ahead on 8u31
 
I would avoid monkey patching if I were you @skiwi
> it's very gratifying to finally play a game that's more organic than a brick in a dishwasher.
Oh Yahtzee, never change.
 
11:07 AM
Bricks in dishwashers are highly entertaining.
 
LOL I was just looking for that video.
 
My google foo is strong this morning.
 
That needs to be a slogan on a T-shirt
 
7
Q: Reviewing generated code

JaDoggIs reviewing generated code on topic ? Scenarios: Someone wrote the generator and it is included or linked and provided with generated code. Someone wrote the generator and only included generated code for review. Someone used a third party generator and posted generated code for review.

Voting is leaning toward NO.
 
I would say it is also off topic
Also I find that codereview is infinitely more entertaining if you read every code review like Yahtzee does, btw.
oh bollocks. I've just spent the past hour working out why my controller is not being called
and just worked out that ApiController (Web API)does not inherit from Controller (MVC)
I really hate C#
 
11:25 AM
Well, tell us how you really feel...?
 
Lol
2
 
11:59 AM
Ever wanted to see a real god method ?
2
0
Q: How can I performance of my code?

IJAJ MULANI ` public void search_thread() { Stopwatch sw = new Stopwatch(); sw.Start(); string sqlcmd = "select en.eventname,q.Q,q.QLevel,q.QUsed,q.QType,q.QAlt,q.QStatus,q.QTag ,m.MediaName,m.MediaPath,m.MediaTag,m.MediaType,O.*,c.Cat1,c.Cat2,c.CatTags,c.SubCat1,...

 
0
Q: How can I performance of my code?

IJAJ MULANI public void search_thread() { Stopwatch sw = new Stopwatch(); sw.Start(); string sqlcmd = "select en.eventname,q.Q,q.QLevel,q.QUsed,q.QType,q.QAlt,q.QStatus,q.QTag ,m.MediaName,m.MediaPath,m.MediaTag,m.MediaType,O.*,c.Cat1,c.Cat2,c.CatTags,c.SubCat1,c.SubCat2 from tblQ q Inner jo...

0
Q: IPtables for a secure nginx webserver

JimmyBased on my reading online and a few tutorials I have produced a set of iptables rules: i=/sbin/iptables # Flush all rules $i -F $i -X # Setup default filter policy $i -P INPUT DROP $i -P OUTPUT DROP $i -P FORWARD DROP # ICMP $i -A INPUT -p icmp --icmp-type any -m state --state ESTABLISHED,RE...

 
0
A: Can this C# code be improved?

HeslacherI just would love to enter inside your t_search textbox something like a'); DROP TABLE tblStackData; DROP TABLE tblOptions; DROP TABLE tblCategories; deleting 3 tables of your database. Do yourself a favour and use parameterized queries to avoid SQL injections

:-)
 
http://codereview.stackexchange.com/questions/83553/handling-callbacks-when-doing-async-programming-and-dealing-with-scope/83918#83918

phew
 
@nhgrif yeah
 
12:17 PM
wait, is it the first page for a CR mug, or the top 50
 
Someone wanna do me a huge favor? Approximately 18 hours ago, I linked a SuperUser question in this chat. Can someone re paste the link? Hard to find it on my phone.
 
what was it about?
 
4
Q: Behavior of xcopy when moving files on a network drive

MPelletierUsing a batch file, suppose a directory on a network machine, mapped to a drive with net use. net use \\"server name"\"share name" y: Then from that directory y: cd archive An xcopy to another location on that drive. xcopy *.* backup\ What behaviour would xcopy take? Would a temporary co...

this ? @nhgrif
 
@DanPantry Monkey patching?
 
@DanPantry first page AFAIK
 
12:35 PM
@skiwi Nvm :P
@SimonAndréForsberg only 19k rep to go /s
 
good catch, Michael ^^
 
1:12 PM
@Heslacher, I only program when I have had just the right amount of sleep....lol
 
If you add in the table structure and the SQL query/queries), this question might be on-topic at the CodeReview Stack Exchange site. As it is, however, this question is Off-Topic here, because you're asking about code performance rather than a problem with non-working code, and your exact question is also unclear. — TylerH 1 min ago
 
Yep, @Heslacher, thanks.
 
Greetings, Programs.
 
hello @Donald.McLean
 
As with all Settlers of Catan players, I only program when I have had just the right amount of sheep.
 
1:25 PM
You must be Welsh.
(I can make that joke, because I am Welsh)
 
lol
 
@DanPantry Actually, I have ancestors from Wales (as well as many other parts of Europe, and Africa). But no, that was definitely as Settlers of Catan joke.
 
This seems like a better candidate for Code Review: codereview.stackexchange.comMark 31 secs ago
 
@Donald.McLean ha ha ha, first thing I found when I googled was a Star Trek Catan
 
Yes, there is also a Star Trek version of Settlers of Catan. Which is a level of silliness that I have not yet embraced.
 
1:29 PM
That's so.... vulcan... of you
 
Incoming SFPEQ!
@rolfl should be happy to see this one especially...
0
Q: Series, Powers, and Benches

Simon André ForsbergProject Euler problem 48 The series, \$1^1 + 2^2 + 3^3 + ... + 10^{10} = 10405071317\$. Find the last ten digits of the series, \$1^1 + 2^2 + 3^3 + ... + 1000^{1000}\$. I made two different implementations of this problem, and added a benchmark, using rolfl's UBench library. The code:...

makes me want to create a tag...
 
well, which one is faster?
 
@rolfl the streams, actually.
I'll add the ubench output to the question
 
0
Q: Series, Powers, and Benches

Simon André ForsbergProject Euler problem 48 The series, \$1^1 + 2^2 + 3^3 + ... + 10^{10} = 10405071317\$. Find the last ten digits of the series, \$1^1 + 2^2 + 3^3 + ... + 1000^{1000}\$. I made two different implementations of this problem, and added a benchmark, using rolfl's UBench library. The code:...

 
@rolfl I guess the streams are slightly faster because it can do the reduce operation in a multi-threaded way (assuming that it actually does use multithreading)
 
1:39 PM
The stream is set to sequential.
if you added parallel() to the stream coming from the IntStream.rangeClosed(), you would go faster.
(if you have additional CPU's available)
 
@rolfl holy crap that was faster!
 
Depends on how you measure it ... ;-) In terms of wall-clock, yes, in terms of CPU ticks, no.
I presume you have a quad-core machine?
For the record, That is the major benefit/usecase for UBench, things like this.
 
@rolfl it actually says AMD FX(tm)-8350 Eight-Core Processor, 4.00 GHz
 
If you have a quad-core, and laid the execution on each core one-after-the-other, the CPU time would be 3.5192 milliseconds, which is a bunch slower than the 2.4ms from the for-loop (or the sequential() stream).
OK, the 1000 members in the stream is probably not enough to ramp up the scalability on the cores.
 
additionally, skipping every 10th value also increases performance, by 10% (did not incorporate this change into the question though)
@rolfl probably not
 
1:47 PM
So... How to append a slash to a string only if last char isn't already a slash in Powershell? @RubberDuck @Mat'sMug
 
@nhgrif Use a regex to strip any trailing slashes, and then always add one.
 
@Donald.McLean I have never heard of Settlers of Catan before you said that remark....
 
Hmm good idea.
 
$path.trimEnd('\') + '/' .... or something
 
every time someone mentions vulcans I think of Bones...
 
1:53 PM
@Malachi - don't cross the memes.
Who you gonna call?
 
Bones McCoy the doctor, I can hear his voice saying something about Spock....lol
 
Ahh, different Bones....
 
lol
there are a lot of different opinions on that Meta question from yesterday... holy carp
@rolfl GhostBusters!
 
Is this code working? If it isn't you need to be specific about the problem to get any help here. If it is and you just want a review then this belongs on codereview.stackexchange.com instead of here. — Etan Reisner 1 min ago
 
2:18 PM
@Malachi It's a nerdy boardgame, except that it has become so popular that it's almost mainstream. There was an episode of "Big Bang Theory" where they were playing the game at the beginning of the episode.
 
So... Stuck again. Get-childItem is prepending the working directory or something rather than letting me specify an explicit directory...
 
@Donald.McLean I need to get caught up on that, maybe have a marathon if I can find it on Netflix or Hulu or internet somewhere. probably going to have to start over.
I don't have cable....
 
I have just come up with a solution to a problem I've been thinking about for ages, and i bet i will not implement it because no patience
;-;
 
@Malachi one more:
0
A: Reviewing generated code

Mat's MugNo, it's not. It's not the generated code that's reviewable, but the input that was used for generating it. I have a lexer and a parser generated by ANTLR4 in C# ..but I didn't write that code, and even if I put it up for review, and even if it does get reviewed, then what? I'm not going to modi...

 
2:34 PM
@Mat'sMug see my Powershell problem?
If I give it a literal string for the -path, it works. If I give it a variable, it tries to prepend working directory.
Never mind... I finally saw my typo...
 
Take this code for example: pastebin.com/YNwkymgK. This is a CodeDOM tree that will generate a .Equals() implementation based on some parameters that I pass in. Why would I not be allowed to show you the resulting output and ask whether the implementation follows conventions? — Jeroen Vannevel 20 secs ago
I really don't see why there must constantly be restrictions on what can be reviewed.
quality assurance is one thing but it's too strict for no reason sometimes
 
2:53 PM
@JeroenVannevel I agree with you on that.
Why don't you just ask the question and we'll see what we think about it and make a decision based on your specific question rather than trying to come up with a "one size fits all" general policy? — Simon André Forsberg 16 hours ago
 
Would we review a FizzBuzz program based on its output?
2
 
It's not about output vs non output
it's about code vs not code
 
@JeroenVannevel it is about input vs output
 
Why? Why does knowing that the code was created by a generator instead of typing it make a difference about its reviewability?
 
the code is generated. Any changes suggested are irrelevant.
"it would be more efficient to do X instead of Y" doesn't apply either
 
2:57 PM
.. but why? You can adapt the configuration of the generator based on the answers
Or you can change certain parts of the implementation because it has now become clear that your generator doesn't produce standardized code
 
The problem is IMO that the original meta question might be about a specific case, but the question is asked as if we should try to come up with a general answer for generated-code questions.
Has generated code questions been a problem on Code Review? No. Why then are we discussing a rule about them!?
 
@JeroenVannevel then get the input reviewed, it'll be more efficient!
@SimonAndréForsberg because, y'know, edge cases shouldn't fall into the cracks! ;)
 
There will always be cracks.
And stop editing!
 
The input is in my case not even code, its just an XML file with a configuration
 
I suggest @JaDogg just asks his question, no matter if it's on-topic or not.
 
3:02 PM
If I wanted to know whether my Equals implementation conforms standards I wouldn't be able to with the majority concensus right now
which is, in my opinion, not right
 
This would be better for codereview.stackexchange.com than SO. — JNYRanger 1 min ago
 
0
Q: Simplification of multiple for loops

SivaRajiniPlease refer below code <table class="report export-list"> <thead> <tr class="red"> <th>Date / Time Requested</th> <th>Report Name /Description</th> <th>Filters</th> <th>Status</th> ...

 
@DanPantry Wait a minute... 19k rep to go? The first page has a 7.4k limit. You need to reach 7.4k, which for you means an additional 6.2k reputation.
 
;-;
For some reason I thought it was higher
 
7.4K is easily attainable in 8 weeks ;-)
1.4K a week is managable, which, technically, makes it....5 weeks?
 
3:08 PM
@rolfl there is likely more than 8 weeks left until graduation though, is it not?
 
The Code Review site is probably better suited for this question. — Poldie 1 min ago
 
I have heard nothing.... and.... I don't know when they call it a cut-off....
 
codereview.stackexchange.com is better suited for this question. — JNYRanger 1 min ago
 
But, there is likely at least 8 weeks between the announcment on meta that we are getting colors from the design team, and the actual implementation.
 
0
Q: Why is One Method better than Another?

jp2codeI am at a company that has a software group where I work at one of the remote offices. In the code I am currently working on, there are several calls to this method: <Obsolete("Consider replacing with ExtendRound in Rounding.vb", False)> _ Function ExtendAmount(ByVal pAmount As Double, ByVal pQ...

 
3:14 PM
So... We're going to write reviews to suggest people change configurations on their IDE to generate code in a better way?
 
The code generation I showed as an example has nothing to do with an IDE
If someone uses that library to generate classes and wants to know whether he configured things correctly (aka: the resulting code conforms to standards) then that should be possible
 
@GertArnold Sorry if this is off-topic. I agree that it would be better on Code Review, I just didn't know that Code Review existed. — FelesMortis 1 min ago
 
There are many types of code generation and selectively allowing/forbidding certain types makes no sense
 
I'm voting to close this question as off-topic because it is about code reviewsjagr 43 secs ago
 
@JeroenVannevel that's probably correct. I personally wouldn't bother putting up any generated code for review though.
 
3:20 PM
0
Q: Prepared statement inside function then return results

adrianI've created a function that makes a query of a database table and managed to use the results in another page where the function is called. My question is, if this approach is good: function cart_list($db, $user){ $stmt = $db->prepare(" SELECT o.username, o.quantity, p.descript...

 
@CaptainObvious VTC/unclear
 
@CaptainObvious VTC / explaining code
 
3:42 PM
I would have to see an example in the form of a CR question, but I'm really not buying it.
Because i don't think reviewing configurations is really on-topic...
Moreover, a review of generated code will highly likely include suggestions that configurations can't adjust. Moreover, if you don't trust the generated code and need it reviewed, why are you using a generator?
 
Wouldn't this question fit better to code review? — sleepless 55 secs ago
 
What's your schema like? How many rows are involved in which tables? Are any indexes hit? What's the execution plan looking like? — Mat's Mug 38 secs ago
 
this question would be better on codereview.stackexchange.comthumbmunkeys 15 secs ago
With a little bit more context in the question itself, this could be a good fit for Code Review, indeed. ON CASE WHEN... joins don't smell very good either. Have you tried CTE's? — Mat's Mug 15 secs ago
 
@Mat'sMug Those string functions are smelly too
 
@thumbmunkeys This is example code and would be closed as off-topic on Code Review — Simon André Forsberg 1 min ago
 
3:57 PM
What is a CTE? Didn't realize there was a Code Review site ... I don't really consider SQL queries code though lol — Brian T Hannan 1 min ago
 
What is a CTE? Didn't realize there was a Code Review site ... I don't really consider SQL queries code though lol — Brian T Hannan 1 min ago
 
@Duga bring it over
 
@Mat'sMug You scared me, I thought @Duga did a double-post
2
 
lol
7
 
...
 
4:06 PM
INNER JOIN
   DB2..table4 (NOLOCK)
      ON CASE
         WHEN CHARINDEX(':',
      table2_batch.reference_number,
      3) > 3 THEN SUBSTRING(table2_batch.reference_number,
      3,
      CHARINDEX(':',
      table2_batch.reference_number,
      3) -3 )
      ELSE
   RIGHT(table2_batch.reference_number,
   LEN(table2_batch.reference_number) -2)
end = Cast(table4.PurchaseOrderID as int)
 
That's not SQL.
 
First thing after not connecting for days: I star a "lol" .____.
2
 
CR1's "Where are they now?"
 
I think I'm starting to push it a little... am I?
0
A: VBA Compile Error 'Wend Without While'

Mat's MugThe real problem is that you have a method that does too many things. You can locate the mismatched code block, and fix it - but you'd be dismissing a readability issue with an "hey it works, leave it alone" excuse. While 'code to run in loop Wend ' **** move to another method While 'code ' ...

@Morwenn hi!
 
4:14 PM
@Mat'sMug I think you should take out "I know, I wrote it" and that will look perfectly innocent :)
 
but then I need some kind of a disclaimer, no?
the more I mention Rubberduck on SO, the more I'm starting to feel like a spammer :/
(edited "I know, " to "disclaimer: ")
 
You're just linking to a useful tool; it's not like you're charging money or anything for it. But in my opinion I would avoid mentioning at all that you are making it (that's what might make it feel like spam)
Also, Wend is a weird key "word"
 
yeah. it's While+End => Wend. Don't know why it's not End While
This is a good suggestion, but it does seem a bit obsessive to convert that first block you marked to another method. Also quick question: might there be any loss any speed using function extraction if my macro is going through a lot of files and through each loop many times? — ZX9 3 mins ago
 
Wend takes fewer bytes than End While I'm sure Microsoft kept in mind that saving characters in code is an important matter.</sarcasm>
 
This answer needs a bit of help - mostly in the flagging section:
0
A: Pong game in Java

cirino silva tovarSorry, but I had just testing this example, and it do not run as specting, only present a blank panel. !!?? I had compiled the code under Mac OS X, and jdk7.

 
4:24 PM
@Mat'sMug: They kicked this off StackOverflow, too, because it looked like something for Code Review. Is there anywhere on StackExchange to post questions like this? — jp2code 28 secs ago
 
@Mat'sMug I just learned that MS likes unicorns: winbeta.org/news/…
I remembered that you like them, so I thought you might want the sticker.
 
lol
SE likes unicorns... wait, were you there last April 1st?
 
Ethiopia just laughed at me for being uncultured
What kind of twisted world is this
 
Let's see, last April was just before I started hanging out in the WPF chatroom to learn enough about WPF to do my app.
I think I started in May.
 
so you missed all the Unicoin buzz
 
4:32 PM
So, probably not - I was studying then.
Right now, I'm trying to work on my essay, but Word didn't open:
 
doesn't look too good
 
Got it this time.
 
Which reminds me: I have a survey essay I have to start soon. >.<
 
Hardware MonitorWindow .... ? What?
 
I think it might be related to my drive problems.
I'm keeping all my important files on OneDrive now.
Didn't use to, but this way I will still have them unless OneDrive goes down too.
 
4:43 PM
Does it give the result you want? Then it is "correct". If you are looking for a code review, you are on the wrong site and might want to try codereview.stackexchange.comQuentin 46 secs ago
 
Frankly, sorry for being rather absent. I still don't have internet except at work :/
 
@rolfl Crap, I just realized I almost reviewed code commented on usability for code that didn't exist in your last UBench question! I think I'd better make some github issues instead...
@rolfl Some enhancement suggestions created as issues on your MicroBench repository. Let me know what you think and if you'd like some pull requests.
 
5:15 PM
This might be a good candidate for Code Review (codereview.stackexchange.com) — theWanderer4865 32 secs ago
 
@Duga I'm not too sure about that.
 
@Jamal that's exactly what I was about to say
 
When I see the word "might", I get a bit nervous.
 
"Am I missing any edge cases in this test?" is ok, right?
 
@theWanderer4865: I don't think it would work on Code Review. We can determine if existing tests are good, but we can't specifically recommend new tests not already implemented. That would have to be part of an existing review. — Jamal 1 min ago
 
5:24 PM
Or not
 
@Mat'sMug Yes
 
@Jamal well... if what @Mat'sMug said is ok, then we can recommend adding new tests, right?
"Am I missing any edge cases in this test?" == "Can you recommend me more tests?"
 
@SimonAndréForsberg Yes, as long as that's not the entire answer. It'll otherwise be asking for new code, in a way.
 
#fiftyshades
 
@Jamal the answer doesn't change the on-topicness of questions
 
5:26 PM
It's a pointless discussion since all he has to do is add "does this code follow standards?" and everything is ontopic again
 
^^ right
> The methods in this methods are tested seperately, so for this one it's more like an integration test. So any inputs on what else to test for this method would be great.
 
Microbench is inspiring.
 
the formulation of the question is not optimal, but I'd say that it is on-topic
 
I'd rather find reasons for Q's to be on-topic than off-topic
2
 
^
 
5:29 PM
Agreed.
Often we see what we want to see.
 
I feel like on SO I'm one of the hardliners when it comes to on-topicness and here on CR I'm one of the most lenient
 
If you look for reasons for a question to be off-topic, you will most certainly find some.
 
Or maybe you're all so bittered by SO that you've become really protective. Possible too, of course!
 
Perhaps at least a title change is needed. Such a title can attract code dumps.
 
@Jamal A title change is usually needed, for many questions.
 
5:31 PM
@Jamal might be a moderator on Code Review, but I disagree. I think this is on-topic on Code Review. It is not a good CR question, and slightly unclear, but I think it could work, personally. — Simon André Forsberg 2 mins ago
 
@Duga Has the elections campaign started? lol
 
I'm out jogging for a bit. Gotta make sure the muchachas like what they see
 
Later @DonJuan!
4
 
5:50 PM
We have a couple wild Mallards in our backyard pond.
We get a pond almost every year when the snow melts, but it goes away after a while.
 
Check out codereview.stackexchange.com, you'll find a lot of examples, often of a great quality. — Vladimir Sinenko 1 min ago
2
If I recall correctly, 7za.exe exits with an exit code of 1 if files are in use. You could use conditional execution to test for this. There's a demonstration here. — rojo 12 secs ago
Thanks guys. Yeah, apologies on making my question not well versed. I should have asked "Code Review RSpec test, what else should be tested". — svajone 1 min ago
 
6:36 PM
@Simon - been in presentations. Those issues all look reasonable, but the report title one needs a little discussion
 
This belongs in CodeReview, not on SO. — RLH 1 min ago
 
@rolfl sure. agreed. I'm not sure about the report title thingy myself.
 
I was doing things like:
report("Warmups", bench.press(1000));
report("Full Run", bench.press(10000));
 
0
Q: Read Space Delimited Text File to Standardized Data Type

ben rudgersFrom the README.md Introduction: The purpose of data-in is to read all the lines from a text file and return the file's contents as a Clojure value in a standardized manner. Specification: Takes: Filename Assumes: a space delimited text file Returns: Vector [L1,L2,...Ln] where Li: ...

 
Additionally, I was also occasionally doing the press without any reporting.....
bench.press(1000);
report("Full Run", bench.press(10000));
 
6:41 PM
Does the assembly code work as intended? If so, @RLH's comment is a way of saying Code Review may be a better place to ask. If not, then your question is not very clear, Stack Overflow (SO) likes clearly presented specific programming issues. Cheers! — Mat's Mug 47 secs ago
 
@rolfl report method is defined where? In the class that uses UBench ?
 
Yeah, on bench itself.. the code examples above are wrong: github.com/rolfl/MicroBench/blob/master/src/main/java/net/tuis/…
bench.report("Warmups", bench.press(1000));
bench.report("Full Run", bench.press(10000));
But, really, it can/should be possible via......
bench.report("Warmups", 1000);
bench.report("Full Run", 10000);
But then there needs to be the runmode as well.....
 
@rolfl that makes more sense, yes
 
bench.report("Warmups", UMode.PARALLEL, 1000);
bench.report("Full Run", UMode.PARALLEL, 10000);
 
runmode? oh, that runmode.
and then there's also the run where it runs only for a specific time, etc...
 
6:49 PM
Yeah... it gets messy quite fast.....
 
which makes me think that perhaps a UBenchResults is a good option?
 
Don't make mess, make code instead!
 
Well, the List<UStats> is what you get......
 
@skiwi look who's talking
 
@SimonAndréForsberg Says the one who says it's fine to mix tabs and spaces in Cardshifter ;-)
 
6:51 PM
@rolfl at the moment, yes. But how about getting a UBenchResults object instead?
 
You can then report on those stats in various ways, including sorting them by different stats
 
@skiwi touché
yes, but I don't plan on removing the List<UStats>, only considering wrapping it inside UBenchResults
 
hey, Java 8u40 is out? :o
 
thoughts?
@usr when has a case when and a useless cast ever been beneficial to performance in an on clause? — Mat's Mug 41 secs ago
 
Wot iz teh bezt wai to git rid uf hedakes?
 
6:54 PM
@Hosch250 spelling correctly.
 
lol
Actually, I had to think harder to write that wrong than I would have to write it right.
 
@Hosch250 Stay drunk
2
 
@rolfl I'm not drunk.
I'm just really tired, and I am having a hard time thinking straight.
 
Don't push yourself
 
27 secs ago, by Hosch250
I'm just really tired, and I am having a hard time thinking straight.
 
6:56 PM
Well, I would take a nap, but I'm overloaded with school.
 
^^^ Now is about the time you learn what being a programmer is about
 
I wish I was programming.
I'd be so interested in what I was doing I wouldn't notice my headache.
 
@rolfl No, being a programmer is running the same failing testcase three times straight, and still expecting different results
 
@Simon - as for the pull requests, I am all ears. I have to work on some documentation and presentation stuff for the remainder of the day (a few hours more). Will look in to it when I get home
 
I think I'll go read one of my textbooks until the words start spinning, then I'll take a nap.
 
6:58 PM
@skiwi That makes sense when running windows
 
@rolfl And for my case yesterday it also made sense ;)
 
@skiwi I usually run it that many times expecting the same result, but also trying to trace where it fails.
Anyway, TTYL.
 
Combine Java's Class#getDeclaredMethods returning methods in random order with JavaScript's closures capturing variables by reference instead of by value
 
@rolfl About the UBenchResults thingy, I am a bit reminded about how I had structured my Minesweeper analyze. It was pointed out to me that my class was doing too much. I'm thinking that the UBench class is not really capable of reporting anything on it's own, without the List<UStats>. Should then the reporting be the responsibility of the UBench class? The report method could be static as it is right now, which would definitely be better.
@rolfl alright, I'll see what I can do :)
 
0
Q: Nit picking performance on this search code

VolearixI am working on a fairly complex (at least it feels complex to me at the moment) search program and am looking to possibly increase the performance. Everything works exactly how I want it to, but I'm just wondering if there are any slight performance increases I could benefit from. In this code E...

0
Q: How can I make this program more efficient?

JamesI have just completed problem 29 from the project Euler website (link here) Consider all integer combinations of a^b for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5: 2^2=4, 2^3=8, 2^4=16, 2^5=32 3^2=9, 3^3=27, 3^4=81, 3^5=243 4^2=16, 4^3=64, 4^4=256, 4^5=1024 5^2=25, 5^3=125, 5^4=625, 5^5=312...

 
7:28 PM
@SimonAndréForsberg I was writing an answer, but you beat me to it.
2
Q: Project Euler 29 - Distinct Powers

JamesI have just completed problem 29 from the Project Euler website: Consider all integer combinations of a^b for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5: \$2^2=4\$, \$2^3=8\$, \$2^4=16\$, \$2^5=32\$ \$3^2=9\$, \$3^3=27\$, \$3^4=81\$, \$3^5=243\$ \$4^2=16\$, \$4^3=64\$, \$4^4=256\$, \$4^5=1024\$ ...

 
@MannyMeng FRITW: Fastest Reviewer In The West.
@MannyMeng There might be room for one more though?
 
@SimonAndréForsberg You said what I was about to say, so not really.
 
@MannyMeng crap, I'm destroying our answers-per-question ratio.
3
 
This might be a better fit for codereview.stackexchange.comj08691 1 min ago
 
@SimonAndréForsberg lol
 
7:33 PM
I'm voting to close this question as off-topic because this question belongs on another Stack Exchange site: codereview.stackexchange.com — Spencer Wieczorek 1 min ago
 
@Duga belonging on another site is not a close reason for non-migration paths!
 
@SimonAndréForsberg "(close|closing).*belongs.*code/s?review" -> could @Duga post a comment in response saying exactly what you said there?
 
@Mat'sMug @Duga does not have enough reputation on Stack Overflow.
 
aw
 
7:38 PM
give it redbull — Pedro Estrada 1 min ago
WTF?
 
@Mat'sMug Here's one possible reason why @Duga should not post comments:
@SimonAndréForsberg There is a reason why there is a option listed "This question belongs on another site in the Stack Exchange network" on the off-topic section. If the site is not included in the list you use a custom flag for migration. — Spencer Wieczorek 4 mins ago
To which I reply:
@SpencerWieczorek Yes, you use a custom flag for migration. Not a close vote for migration. — Simon André Forsberg 51 secs ago
Oh I think someone is trying to be funny...
@SimonAndréForsberg Oh your right, I didn't noticed I clicked the close button. I thought I clicked flag :P. — Spencer Wieczorek 30 secs ago
@nhgrif What should we do with all these Stack Overflow users who doesn't know the difference between a close vote and a custom flag?
 
ooh that's good
> Public Const timerStart = 6 ' five seconds
 
Burn them.
2
 
@nhgrif For five or six seconds?
 
My cat just turned into Wolverine
 
7:50 PM
yikes!
 
That happened through a long-sleeve shirt just now.
 
stepped on its tail or something?
 
No, I picked him up off my desk, and he lost his balance, so he clawed into my arm to keep from falling.
@JeroenVannevel What kind of options are available for the whopping two arguments passed into that? Essentially, you're asking us to review the code you generated using this to determine whether or not you're passing the right arguments... — nhgrif 3 hours ago
Still unanswered. :/
Looks like there are only three interesting things in the world to cruise to: Caribbean sun, Scandinavian landscape and Mediterranean cultural heritage. — Alexander 10 hours ago
 

« first day (677 days earlier)      last day (3342 days later) »