« first day (494 days earlier)      last day (3529 days later) » 

1:31 PM
Got quiet in here in a hurry.
 
Yup.
 
MONKING! WAKE UP!!!!
 
HI MONKEY!!!!!!11
 
monking!
 
@Phrancis *snoooore* Huh? (sleepily looks around) WHAAAA!
 
1:40 PM
@rolfl MONKING!
I AM AWAKE!
 
btw, OP for the IEnumerable.Empty<T> thingy self-deleted just now.
 
I guess he didn't want to ask a meta-question or join chat, then
for the record: I would have considered using IEnumerable<IEnumerable<T>>, looped through it, and concatenated all the IEnumerables that was not null.
Or simply IEnumerable<T> result = empty; and then two if-not-null checks and concatenated then.
 
> you're googling it wrong.
yeah, right.
> You will see a lot of code like this after you finish your school and get a job.
yeah, and you shall fix it.
 
First commandment: Thou shall fix ugly code.
2
 
Second: Thou shall include all context.
 
1:47 PM
Third: Thou shall honor the conventions.
 
beautiful. Let's make 10 of 'em.
and carve them into stone.
 
And give them to Moses?
 
...or let Moses pick them up on Mount Meta.
 
To make the second more like the real second commandment, that should be: Thou shall not take the name of your programming language in vain.
 
so is a sin?
 
1:51 PM
No, but JAVA is.
2
 
ah!
love it
 
Thou shall fix broken code before you put it up for review.
 
maybe it's best split them in two tablets.
one for askers, another for reviewers.
 
You shall not covet your neighbor's badges. You shall not covet your neighbor's reputation, or his questions or answers, his mug or monkey, or anything that belongs to your neighbor.
3
 
0
Q: What ordering of functions makes code most readable?

Devon ParsonsImagine the following code: begin main rescue puts "Error" end def main puts foo bar baz end def foo x = build_foo y = update_foo(x) finish_foo(z) end def build_foo "this" end def update_foo(foo) foo + " is" end def finish_foo(foo) foo + " foo!" end def bar puts "ba...

 
1:55 PM
Thou shall mercilessly kill off-topic questions?
 
@CaptainObvious Thou shall be faster in posting new questions.
 
good timing @Mat'sMug.
 
Thou shall kill zombies.
 
def main
  puts foo
  bar
  baz
end
 
@RubberDuck indeed.
 
1:55 PM
off topic much @CaptainObvious?
 
it doesn't get any more example code than that!
 
@RubberDuck I'm gonna steal that modification you did right back
 
0
Q: Count PDF pages in contructor C#

chazjnI have an object that represents a PDF file. In the constructor, I pull out various information about the file name and make it available via properties: public class Invoice { //public properties public string FullPath {get { return this.fullPath;} } public string FileNameWithoutEx...

0
Q: Function with underscore overuse

kharandziukIs it a good piece of code? deserialize: (profileJSON)-> return profileJSON unless profileJSON.productText? profileJSON.productText = _(profileJSON.productText).reduce( (acc, el)-> current = _(acc).findWhere( _(el).pick('sequence', 'textType') ) unless current?...

 
2:11 PM
BTW, did you guys see this?
8 hours ago, by Phrancis
user image
 
Hey! Grats @200_success!
3
 
meh. so not interested .... :(
 
@rolfl you still have the chance to be first to 50K
 
I know ... ;-) But he's 2.8K ahead of me... that is a stretch to regain.
I just ignore the 'all' page, and look at the 'this year' page .... oh, crap. :(
 
Sad monkey
 
2:20 PM
lol
 
0
Q: 3 dimensional monte carlo integration using importance sampling

ZephyrI'm integrating a density distribution over an effectively infinite space using a monte carlo integration and importance sampling (have a look here for an idea of the method http://web.ornl.gov/~pk7/thesis/pkthnode19.html) I'm using a probability distribution with p(r) proportional to r^-3 (so c...

 
Interesting first time user question, too bad it's off-topic...
> The integral should give a value of about 100 , I've checked both mathematically and using another numerical simulation, but at the moment this code gives 7e−4 ...
 
am I pushing SRP here?
 
1
Q: Time complexity of 01Kanpsack challenge

CodeWriterThe code gives correct output. How do I calculate time complexity for code like this? The program finds all the combinations of items and sees if the combination gives the max profit. If the last item can't be added or there are no more items left, it checks to see if this value of knapsack is m...

 
> How do I calculate time complexity for code like this?
Borderline off-topic? I think if that sentence was removed it would look like a good CR question...
 
2:34 PM
I think it's fine
but yeah, if the sole purpose of OP's question was how do I calculate time complexity.. then yeah, KTHXBYE
ugh. I hate MSDN - This method does not verify that the path or file name exists... but it doesn't list FileNotFoundException under "Exceptions"... so, what happens when you give it a non-existing file name? returns null?
 
> This method does not verify that the path or file name exists.
 
0
Q: Find the Max Width Of Tree

JavaDeveloper 1 / \ 2 3 / \ \ 4 5 8 / \ 6 7 Width of a tree is maximum of widths of all levels. For the above tree, width of level 1 is 1, width of level 2 is 2, width of level 3 is 3 width of level 4 is 2. So the maximum width of the tree is 3. This...

 
just tested it, you give it "foo.bar" and returns "foo"
removed the part about constructor throwing an exception, ...it was just plain wrong.
 
@Mat'sMug I would just expect it to return the same result as if the file did exist.
@Mat'sMug that is exactly what I would expect. As it just uses string and not File objects
 
yeah, brain fart
JDQ's are getting redundant and boring.
3
 
2:44 PM
@Mat'sMug yes. I am ignoring them totally these days.
 
he needs to start implementing fun stuff, like a game or something.
 
@Mat'sMug Take (structure using nodes) and do (something repetetive and in principle always the same) with it.
here's your JDQ..
 
Maybe he can do a JDQ FizzBuzz?
 
@Mat'sMug After a quick read-through, I don't think so. But I believe you're breaking SRP here
@Phrancis FizzBuzz linked list tree!
3
 
@SimonAndréForsberg clever
No, thank @Mat'sMug for that. — 200_success ♦ 45 secs ago
Thanks @200_success :)
 
2:49 PM
@Mat'sMug SRP = Santa Responsibility Principle.
2
 
ah, of course!
 
0
Q: Java 1.7: Optimization of Barnes-Hut Multithread Insertion algorithm

GemstoneI'm currently working on optimizing a barnes-hut implementation ( connected to a previous post I did ) and I need help to optimize it further. After some testing, the main problem appears to be in the Insertion algorithm, which takes roughly 3-10 times as long as the second longest part of the ...

 
@Mat'sMug Hmmmmm ?
 
sort of... but the new wheel is square apparently ;)
 
Aren't most of them?
 
2:55 PM
lol probably
 
@ChristopherRucinski String.format is however re-usable for many operations, it's not limited to one specific expression. Each of your enums is limited to one expression format. Overall, I think it is over-engineered, it shouldn't be necessary to create a new enum for each format I want. Additionally, String.format can use an argument twice, if I specify the argument string %1$d %1$d and the argument 42 then it becomes "42 42". If you want to keep comments down, you can find me in Code Review chatSimon André Forsberg 24 secs ago
possibly a new chatter incoming
 
Hey Simon...by the way, thanks for your answer
It definitely will help me improve it
however....
 
let me just jump in here and greet you: Welcome to CR Chat @ChristopherRucinski
 
@ChristopherRucinski hey there!
 
The thing with my approach is that it puts an object-oriented way of doing everything you could do with String.format. I can also print out an argument twice
 
3:05 PM
And welcome to The 2nd Monitor
@ChristopherRucinski I believe there are better ways of making it object-oriented than using your enum approach.
How would you print an argument twice?
 
I agree that for simple expressions, my way is overkill. String.format("%s %s", "hello", "world"); does not need this solution. I agree! I am talking about the daily approaches that normal individuals use to perform String.format(). They are not generating code. They are doing simple to kind of complex placeholder formatting
 
Hi @Christopher, welcome to The 2nd Monitor! I have a working C#-like String.Format implementation in VBA that can serve as an inspiration if you want to take a look: codereview.stackexchange.com/questions/30817/…
 
@Mat'sMug I will double check it, but I think I seen yours already when I was creating my question
@SimonAndréForsberg In formatRealExpression()
 
Hmm yeah it's likely to come up as a similar question ;)
 
instead of returning (in my case) a String value from a custom Number, I could save a the String in a variable, and just return it concatonated twice
 
3:15 PM
@ChristopherRucinski Ok, that would solve part of it. But what if you wanted to do %1$d %2$s %1$d with arguments 42, "hello" so that the output would be "42 hello 42" ?
 
21
Q: Do ants or other insects sleep, and if so why?

J_mie6I was thinking yesterday about insects (as there was a spider in the house, and I couldn't help but think of anything else, even though they aren't insects), and I started to wonder if ants sleep? After thinking about it for a while I decided that they might sleep, but then what would be the pu...

 
oh gosh, thought it was a CR question!
 
However, I can do even more advanced things that String.format cannot. Lets say I wanted to print out an argument twice, but the second argument would be augmented (+1 to argument, double it, etc...). ie. pass in 42, and it prints out 42 84
 
Hello everyone!
 
hi @Marc-Andre!
 
3:19 PM
@Marc-Andre hola
 
@ChristopherRucinski I'd think that's beyond the scope of string-formatting.. and a little surprising.
but it could be useful.. and I'm no guy, so... who am I to say?!
 
@Mat'sMug that's what you can do with an alternative to string.format that is more modern
 
0
Q: Python Multiprocessing Early Termination

fire_waterEnvironment Mac OS X 10.8.5 Python 3.3.3 While my script is running, it is possible that an error may occur at some point. In that case, all processes should be properly terminated, an error message should be returned, and the script should exit. The code I have now seems to not fulfill thos...

 
Yesterday I've tried a sport class to counter the fact that I've done almost nothing in term of sport since I started working in IT. I was so rusty. (I'm sorry if my English is bad, my brain is dead today, I can;t write properly)
 
@Marc-Andre What kind of sport?
 
3:23 PM
@SimonAndréForsberg Simple. Those are 3 separate placeholders, so you would have 3 separate enum instances. You would just call the "state" variable that contains "42" twice.
 
Yay, checkmark! +100 today already!
 
@RubberDuck Well it's not a "sport" it was more of a physical activity, we were doing "urban parkour" (Translated directly from "parcours urbain"). We were doing exercise as we were running.
 
my only sport these days is "urban parking"
 
Ahhhhhhh. Nah man. That's a sport. Just not a competitive one.
 
Well based on how my muscle are, I can assure you it feels like it :P
 
3:26 PM
does climbing 3 floors every day with 30lbs twin toddlers in each arm count as a sport?
 
@Mat'sMug Yes.
 
phew!
 
@SimonAndréForsberg @Mat'sMug @Any.One.Else How often do you do print an argument twice?
 
So does toddler wrestling and toddler herding.
I had twin brothers and another one a year younger than them. It's a workout man.
 
@RubberDuck actually there's even world championships in that...
@ChristopherRucinski how often do you print arguments?
 
3:29 PM
wooords
0
A: Find the Max Width Of Tree

PimgdSimilar code, so similar answer. Please take these things to heart; I feel like I'm wasting my time otherwise. return maxElementOfArray (arr); You have a space between the function name and the parentheses. Finalize your arguments if you're not gonna do anything with them. Final your loc...

 
I can claim all of these heritages......
user image
3
 
@ChristopherRucinski I admit, not that often, but it does happen.
@ChristopherRucinski I think the usability and reusability of your code is very intertwined. The more usable it is, the more re-usable it will be. And vice-versa.
 
^^ that
 
@ChristopherRucinski I had a feeling you were going to suggest that "3 separate placeholders" approach, and I don't find it a good solution, to be honest. It complicates things.
 
true...but it does not happen much. right?
 
3:33 PM
right, but it sort of has to be supported ;)
 
@Pimgd do I pick up a bit of sarcasm in your tone? ;-)
> Please take these things to heart; I feel like I'm wasting my time otherwise.
 
@ChristopherRucinski Separations of concerns: Your String.format alternative should not alter the arguments that I pass to it. If I pass it 42, it should print 42. If I pass it 42 and 84, then it should print 42 and 84. Your "feature" is not a feature that your code should be responsible for.
 
@Mat'sMug @SimonAndréForsberg If I can get this to be reusable and fix the issues wiht it now, then I can work on a solution to make that supported
 
Looking forward to that.
 
@SimonAndréForsberg for the record, I agree with this.
 
3:36 PM
I am just saying that it is possible. I would not do that as I cannot think of a reason why I would need to do that
 
Thank you, @Mat'sMug
 
0
Q: Best practice to avoid if else statement in complex conditions

USer22999299I'm looking into re factoring a part of legacy code. if(tcState == SectionB.States.DROPPED || ccState.getState() == SectionA.States.REMOVED) newState = SectionA.States.REMOVED; else if(tcState.getInnerState() == SectionA.States.REMOVED && param.externalCheck()) newState = SectionA....

0
Q: How to properly use parameterized Factory.Create() method using DI?

Will MarcouillerMy factory is using method injection because I thought this was the best way to make it so far. Besides, I doubt it is a good thing after having to call on its Create method from within a dependent object. MainPresenter public class MainPresenter : Presenter<IMainView>, IMainViewUiHandler { ...

0
Q: Matlab: How to scale the legend on a wind rose plot

ClaireThis may be a very simple problem but I would greatly appreciate your help. I have created a direction/intensity plot using the wind_rose function in Matlab, however, I would like to change the scaling of the legend. The plot currently produces a legend that has 12 colors that go up in 10 cm bloc...

 
@ChristopherRucinski However, at the moment it is only possible by making compile-time changes to the enum. That is a quite long way to go.
 
Regarding “Now, we get taught that reusability is very important in university; however, when I applied what was taught before, I found out by SO users that my code was not reusable” – I recently read an interesting essay on the topic of reusability. To summarize: reusability has no meaning. What matters is usability. — amon 1 min ago
 
@SimonAndréForsberg But I would have to look at your Separation of Concerns point. I agree with the intent, but I am not certain though
@SimonAndréForsberg only your current thought process is forcing that on you about compile-time...a little ingenuity here and there :)
 
3:40 PM
@amon Hello, lurker! Wouldn't you say that reusability and usability is intertwined here?
@ChristopherRucinski I'm afraid it's all about the (re-)usability :)
 
@SimonAndréForsberg I am going to pretend I didn't hear that and at least still try. I won't sacrifice what I have now as this has a good niche usage I think that is actually wide spread
 
Imagine a typical webpage setting where it is possible to choose the display format of say... time and date setting. Then there are a several alternatives... along with a custom format
 
@SimonAndréForsberg I just wanted to link to that topical essay. It happens to make a good case that “reusability” isn't an useful word in the context of software design: what is code reuse? Isn't what we call re-use the actually intended use?
 
@ChristopherRucinski When you're code can support that ^^ in a clean and neat way, then you really got something (re-)usable.
@amon good point indeed
To support these things currently, you'd need to define four enums for date format, three for time format and five for post permalink format. Not to mention the "custom structure", which would unfortunately just be impossible...
(custom structure would theoretically be possible if using a custom classloader, but that's like using an atomic bomb to break an egg...)
 
Would I would love is to throw my idea to the Java community and see if they can bake in my idea with a keyword like stringformat. That could allow for a complete removal of boilerplate code and such. It could look nothing like enums when you are implementing it....just an idea, but very hard to accomplish
 
3:49 PM
@ChristopherRucinski Could you give an example about that stringformat keyword? What part of your idea would that be? How would it be used?
 
think of the enum keyword and java pre 1.5
 
*thinking* *thinking* ok....
 
instead of public enum Expression {...}, it would be public stringformat Expression
besides that, not too much right now
 
But how would you specify the format in runtime then?
 
Don't know yet....smarter minds would have to prevail there haha
 
3:52 PM
I can't help but thinking, ...how is string formatting not a solved problem already? (sorry if I missed the whole point, I'm only half-here / lurking)
 
public stringformat Expression is possible right now, but that would be better written as public StringFormat expression;
@Mat'sMug I believe @Christopher's ultimate goal is to make it more object-oriented, without having to learn the format specifications such as '%s'.
 
oh
is warranted here?
 
I mean that would be class-level declarations. like public class Expression, public enum Expression, public stringformat Expression
 
@Mat'sMug no, it's not
@ChristopherRucinski Consider making a StringFormat class instead, that could be useful, reusable, object-oriented, readable, maintainable, and everything that you want.
You could make the StringFormat class be a wrapper for having to learn the string formatting specifications.
 
@SimonAndréForsberg there was another suggested edit from that user, on an on-hold question - I rejected it arguing that while a good edit, it would put the question into the reopen queue.
KidDiamond is probably just trying to get to 1K though, or, seeing his score, trying to to get to a nice even rep score.. I can't blame the guy ;)
 
4:00 PM
@SimonAndréForsberg I don't think it would be the same. This current implementation can be more powerful I feel than a wrapper class or string.format in general
 
@ChristopherRucinski I'm afraid I have to disagree with you there. String.format feels more powerful than your implementation right now.
As @Mat'sMug say:
9 mins ago, by Mat's Mug
I can't help but thinking, ...how is string formatting not a solved problem already? (sorry if I missed the whole point, I'm only half-here / lurking)
 
Welcome to 1K, @KidDiamond!
 
I'm not really a Javascript guy, but I think the convention is two spaces, but I tend to use four as well. Don't forget to upvote and accept useful answers. =;)- — RubberDuck 40 secs ago
 
printf-style formatting does have two issues: ① The syntax is horrible. ② When a format is provided as a string at runtime, the arguments can't generally be statically typed. Especially the number of arguments is important. Both problems can be solved by a wrapper method that takes the required values and applies some format.
 
I have a feeling it might not be the VBScript that is the issue it might be the version of XPath that I am restricted to.
or msxml or whatever
 
4:08 PM
@Malachi VBScript is always an issue ;)
3
 
@Mat'sMug A-F******-Men
don't know why they aren't using VBA for these things...
 
same shit, different day name...
 
@SimonAndréForsberg Everything you can do with String.format can be done with my approach in a more readable way. You want to add thousands separator - can do - you want to have min/max decimal places - can do - zero placeholders - can do - "semi-colon" like separate to format positive, negative, and zero number - can do ....
 
can I at least get a couple of votes for this answer on my own question? codereview.stackexchange.com/a/62083/18427
 
@ChristopherRucinski can do, yes. But what is easiest? I find your approach to require a lot of work for very small things. And then there's also the case of the Display.state global that you still have...
 
4:16 PM
@SimonAndréForsberg after just finding out about C# semi-colon specifier, I have to disagree with you on not changing the arugment passed in ie. -42 as (42)
Who says the stress your way can cause with maintainability, debugging, and creating for the format string is easy?
 
@ChristopherRucinski -42 vs. (42) is a matter of formatting. It is not that uncommon to show negative numbers within parenthesis instead.
 
yes, but that is changing the input value
 
No, it's not, it's a different way of showing it.
 
no it's not. input is still -42. ask Excel ;)
 
If you would input positive 42 it would not show the parenthesis, I believe.
 
4:18 PM
^^
 
@ChristopherRucinski a) It's my personal opinion. b) String.format is very well known among programmers, and I have not heard of many people who are having a problem with it.
 
it's not XPath, it's old MSXML probably 2.0
 
I believe VBA uses the same ol' crap...
 
Looking up a format specifier in String.format is about as easy as looking up the Javadoc for the String class itself.
 
True, and that is the only thing I can constantly guarantee that will be looked up everytime I have to touch String.format. Which being a lazy programmer I hate, along with the debugging, and other issues. It really breaks your "zone"
 
4:23 PM
I usually have MSDN on my 2nd monitor when I need it. Not too long though, because it hides The 2nd Monitor ;)
2
 
Do you have a good real-world examples of printing an argument twice? Maybe both one after another, and split (ie 42 hello world 42)? And not contrived examples
 
not at hand, but I've done that in the recent past
 
Competing answer to JDQ, using recursion.
0
A: Find the Max Width Of Tree

Vogel612You could make your computeWidth() method completely independent from precomputing the "height" of the tree. (minor nitpick: trees are deep and not high). If performance (and stackframes) is not an issue it's simply a matter of making the function run recursively. private int computeWidth (Tree...

 
@ChristopherRucinski Then I really don't understand why you don't make a wrapper for StringFormat. new StringFormat().text(" ").str(someString).text(" ").number(42).toString() (for example)
Although what I just wrote there looks pretty much like a StringBuilder
 
yep, that is why.
 
4:27 PM
monking
 
monking!
 
monking @janos
 
I am looking for a way that the caller does not have to care about what the string will look like
 
hey @Vogel612
 
ie new Publish(result).as(Expression.class)
@SimonAndréForsberg Yes, I seen your comment on that code. Will look at fixes
 
4:28 PM
@ChristopherRucinski isn't it the point of string formatting? Making a string look like what you want/need it to look like?
2
 
That is what the Expression class if for
 
oh wait, you mean the format string
 
you decide there
yes
 
isn't that more of a Strategy pattern??
 
4:30 PM
all code related to formatting happens in Expression or ExpressionDoge as my examples go
 
aka. new Publish(result).as(IFormatProviderStrategy.class)
 
Oh, how much catching up do I need to do here.
 
class Expression {
    public String cleanString() {
         return this.first + " " + this.second + " " + this.third + " = " + this.result;
    }
}
 
Then you have a huge mess in cleanString to do all the formatting
 
@SimonAndréForsberg @ChristopherRucinski feel free to get a [chat]room if this conversation is going to stretch some more ;)
 
4:31 PM
Right now you have a huge mess in your enums to do the formatting
 
@Mat'sMug that...
 
I think I've pretty much have said everything that I can say.
 
but it is all localized to each enum instance. One set of formatting for each instance...each placeholder
 
0
Q: Using URLs and RegEx for web scrapper from a dictionary

ZuckI have dozens of functions which GET/POST to some URLs and extract data using RegEx. The URLs and regular expressions were hard-coded earlier but now I moved all of them to a dictionary. I then saw that the URLs and regular expressions are used only once (i.e. each one used only in one function)....

 
^^ That user is 1337!
 
4:36 PM
hmm... need 600 more rep to make it a nice number.
 
oh that's awesome!
24
A: Cleaning lady may have taken fruit from my work desk

RealistIf she had taken your stapler, I would suggest you BURN THE WHOLE BUILDING DOWN. On a slightly more serious note, I cannot begin to fathom as to why you care so much about the fruit or why you are so paranoid that the cleaning lady is some crazy fruit stealer. Was this some kind of magical fruit...

> If she had taken your stapler, I would suggest you BURN THE WHOLE BUILDING DOWN.
 
@ChristopherRucinski It is localized to an enum class, not an enum instance. enum Formats { SIMPLE("%s"), SPECIFIED("%s %d %d") }
 
+1 for "Is this fruit related to you?"Kevin Fegan 10 hours ago
 
@Mat'sMug that made me LOL too. (literally)
 
clever way of calling someone a fruit ;)
 
4:40 PM
In the question : so I know that that this is her doing. Is there one that that should not be there ?
 
I am hoping that part of this answer will help me out with the XPath issue. can't believe I forgot all about this....
3
A: pulling specific data from XML from inside 3rd party application

MalachiHere is what I was able to come up with, thanks to @RetailCoder and some help on StackOverFlow Dealing with the last() function/method not working I was able to add xmlDoc.SetProperty "SelectionLanguage", "XPath" to make it work for me. so here is how I simplified the whole process. I replace...

 
@Marc-Andre That that (the 2nd that) is the that that should not be there.
 
@Phrancis Why not the first one :P
 
@Phrancis don't mess with me like that..... LOL
 
Because the first that is the that that was originally intended.
 
4:43 PM
@Phrancis you're making assumptions. Maybe only the 2nd that was intended, and the first one was accidental.. oh wait...
 
@Malachi I should have went one letter longer before I pressed tab lol.
@Mat'sMug ^^ That. I mean... that... err...
(brain melts)
2
 
@Phrancis Mat's Mug beat me to it! Was just joking ;)
I'm funny like that some time ;) :P
 
0
Q: Using TryXXX pattern to avoid exceptions

MikeI have been using the TryXXX and GetXXX pattern lately to give clients a choice whether to trap an exception or to read a boolean. An example of this concept would be System.Integer.TryParse and System.Integer.Parse. It is my understanding that you should get two benefits from this: 1) using an ...

 
@CaptainObvious sexy question...
 
Hey folks
 
4:59 PM
Stuart, hi!
 
Whats new?
 
@StuartBlackler since when?
 
@Vogel612 dawn of time? :)
na last month or so, not been around for a while
 
@StuartBlackler Well then the correct answer is eeeeverything ;)
 
Got 6 bountied questions, that's new.
 
5:03 PM
Thanks @CaptainObvious.
 
@StuartBlackler as of last night we have our first 40K user, 200_success!
 
awesome congrats @200_success
 
I should add sum-of-rep to my site-wide statistics an rankings.
 
And a sad monkey as a result ^^
 
Happy for 200, sad for me.
 
5:04 PM
even sadder for me at ~4k across all sites
 
Oh
If you
type 4 lines
of text, you get your site stats.
 
Alternatively
3 lines of code
usually do the same
 
hmm my website is confusing me today
is anyone good with reading time lines from chrome?
 
Silence is deafening ... sorry
 
aye :( ive just got like random long pauses and I dont know why :/
 
5:10 PM
it's kinda funny how measly 13.3 k look, next to 51.4 k..
but hey that's almost 10 times the rep I got on SO, so
TTQW... Toodles!
 
5:22 PM
</grabbing-lunch>
 
Toodles Voogles @Vogel612
 
welcome back @StuartBlackler!
 
Cheers @Mat'sMug, hows things?
 
busy as hell at my new job, @SimonAndréForsberg won the race to 20K, and we now have a tag :)
 
Whats your new job?
 
5:25 PM
not a programmer anymore! they called it Business Analyst, ...so I'm setting up a brand new database from scratch, so I can actually analyze stuff
so still coding
but with a 45% $$ increase
3
:)
and best of all, no legacy crap code to deal with
 
nice! Pretty jealous of the no legacy stuff
amazing how much technical debt can make your job harder
 
come now, we all know it becomes legacy as soon as you hit the commit button :)
9
 
@DanLyons meaning legacy > 3/4 months in this case :)
 
@DanLyons yeah.. I'm writing the will-be-legacy-crap-code :)
 
we can code review css right?
 
5:30 PM
I guess..
 
Yeah - kind of - mostly formatting review though? There's not really much else... like reviewing XML or HTML
 
I suppose there can be refactoring around actually cascading
seems like most CSS I read forgets what the C stands for
 
crap style sheets
 
well the thing is I have 300ms of layout on my homepage. There isnt anything that complex tbh
so I need to find it and squash it
 
there's also the tragedy of slow browser adoption of new CSS versions
 
5:33 PM
Also I have 1944ms of idle time im just like what...
 
Okay, two more VB questions and I'll get another shiny badge. I like it.
 
:)
 
And OP wants to argue.... whatever. I've work to do.
"loc1" was location (in the string), but I guess it could be better named. The reason I made BuildBadFractionException was so that callers that use the non-Try version would get a consistent exception without me writing String.Format(message) a bunch of times in the main function. — Mike 3 mins ago
 
FedEx just rang
Hmmm.
 
@rolfl a little box from Stack Exchange?
 
5:40 PM
Taking pics as I open it, I am expecting a unicorn too.... ;-)
 
note: if there's a mug in there, it's not Mat's Mug.
 
and a passport, and some elctronics
Stacklog cleared!
 
Git line ending issues, yaaay
 
user image
8
Now I feel official!
 
Nice one @rolfl
 
5:51 PM
awesome!
 
@rolfl It has eyes and a mouth!
 
it's a screaming hat
 
0
Q: Memory usage in Reversi board state

MephyI'm coding a Reversi game, with an artificial intelligence using the MinMax as the search algorithm. My concern is that (most) search algorithms needs to store a lot of instances of "states", in my case, board states. What I want is to represent a BoardState with 64 SlotState (Empty, White Disk o...

 
Which site's logo is that?
 
@Phrancis it's a mod diamond ♦
 
5:59 PM
OH.
 
@RubberDuck posted a "competing" answer to the fraction converter question, am I going overboard with a regex here?
 
> DISCLAIMER: All advice in this answer is possibly "dangerous" to readability and maintainability of code.
hmm... maybe this answer was not the best idea of mine today..
 
lol
@Vogel612 felt like that when I recommended a regex
 
@Mat'sMug Not at all. That's exactly what regular expressions are for.
 
6:05 PM
@Mat'sMug but that one's helluva dangerous advice there...
 
couldn't resist
 
0
Q: Correct practice for Python properties that depend on other attributes

StickWhen a property is essentially a boolean value for whether or not an attribute exists or is set a certain way, is it more appropriate to create an object that does not list the option attribute in its __init__() call, or is it better to simply create the object with the 'falsiest' version of that...

 
@DanLyons made me chuckle.. but no star for you...
 
@Mat'sMug can the TextAlign hold to MiddleCenter? ;-)
 
@Phrancis no, the <center> cannot hold
badum, ts... YALJ :(
 
6:07 PM
Well regex aren't evil, are they?
 
I don't think any tool is not evil if you use it properly. Except PHP of course.
3
 
Context:
5
Q: Using TryXXX pattern to avoid exceptions

MikeI have been using the TryXXX and GetXXX pattern lately to give clients a choice whether to trap an exception or to read a boolean. An example of this concept would be System.Integer.TryParse and System.Integer.Parse. It is my understanding that you should get two benefits from this: using an ...

Guy's parsing a string that contains a fraction
Looks like a regex job to me '~'
 
@Mat I don't think your regex works.
Maybe I'm just having trouble with refiddle though.
 
Named groups work in .net
 
I regexed an answer today as well, but, no love yet
 
6:15 PM
@Phrancis s/not evil/evil/ ?
"I don't think any tool is not evil" ---> "I (negation) tool (negation)..."
 
@RubberDuck does refiddle support .net flavor of regex?
 
@Mat'sMug supposedly
 
then I F'd up somewhere.. wrote it without Expresso (which I usually use)
 
@SimonAndréForsberg that
 
...but I can't see where, looks right to me (except I'm not sure about the literal escapes.. but I did mention that)
 
Looks like someone has their technology stacks mixed up:
8
Q: Do multiple (.NET) sites in the same application pool share a JVM?

Will PriceIf I have two .NET websites, each with their own CD jars and config in /bin, and running in different application pools, I understand that there are separate JVMs running Content Delivery for each site. If I put them in the same application pool, do they share a JVM? And if so, how does CD get co...

 
So, we have three people starring a message that says that all tools are evil if you use them properly, except PHP...
 
I'm going to try regxr
 
Funny thing is, it was correct at first... but I looked at it wrong and mis-edited. Now I look like a fool '~'
 
@Mat'sMug You're good. Refiddle doesn't like the named groups.
 
Write it down. I just upvoted an answer suggesting the use of a ternary.
 
6:50 PM
And another suggesting the use of a regex!
 

« first day (494 days earlier)      last day (3529 days later) »