« first day (1670 days earlier)      last day (3263 days later) » 

4:56 AM
@Dustiny I dunno if it's faked or not but it's still funny
 
fge
Moo
 
Morning
 
morning
 
5:55 AM
morning shallow
 
hi sword :)
 
6:18 AM
o/
 
6:46 AM
@aioobe It lacks expected behaviour and is therefore closeworthy. I'm surprised it even gets three downvotes at this lack of quality.
 
7:07 AM
Actually, a policy discussed on Meta was to downvote instead of closing bad but answerable questions, which is what I was going to mention instead of the downvotes.
I'm not rejecting how they made honest effort though.
 
Strange. To me the expected behavior was completely obvious, for input interface OUTSIDE the printout "interface=" +interfaceS should give "interface=OUTSIDE" etc.
I think you're reading the "rule book" like the devil reads the bible... I personally think that behavior makes the site a worse place than it needs to be.
 
@aioobe For some definitions of obvious, you may be correct. I personally didn't downvote or vote to close when I see it, but I don't think many other people would share the ability to infer the expected behaviour like you did.
@aioobe There is no rule book.
 
By "rule book" I referred to your reference to meta.
 
I'm not sure how that makes a proper analogy.
 
Ok. I'm backing out on the "rule book" analogy. I wish I had expressed my self differently because it caused you to go on a tangent on an off-topic subject.
 
7:16 AM
Eh, ok.
 
@aioobe He is always the same :P
 
I'd say interface OUTSIDE should result in interface=OUTSIDE is obvious in pretty much all definitions of obvious :)
 
That's really your expertise and opinion. I stared at it for 25 minutes (5 minutes before replying to your chat message, 20 more minutes staring) without a hint.
 
wow. amazing.
 
I won't eliminate the possibility that I'm just stupid.
I'm just throwing that out there.
In fact, now that you pointed that out, OP could had broken down those regexes into individual ones and wouldn't need a huge and complicated regex.
 
7:19 AM
morning
 
I'm also not sure how the site is made a worse place than it could be if it follows the model it's built from, with a Meta site to discuss site policies that constantly change. If it has a problem, it's been there for so long that it's now part of how the site is growing.
I'll be right back.
 
fge
yawn
 
Good morning, Java!
 
Mrng! :D
 
Here's what I think: People saw (?<interface>\w+.*) and thought WTF is this guy doing? They read the first comments which said you're trying to use regexes on xml? You shouldn't... And then thought "what a moron, -1" and moved on. This is my guess since after I posted why do you think he's trying to parse XML? The (?<X>...) syntax is a named capturing groups the question got 3 upvotes (and no more downvotes).
Now this is why I'm saying SO is a shitty place some times. If the questioner doesn't spoon feed you with something that's really easy to answer, the post gets downvoted. Of course the questioner shouldn't make it harder than it needs to be, but some people put ZERO effort into trying to understand what's being asked before they downvote and move on.
 
7:27 AM
and when you have low rep , instant downvote
 
Good morning to all
 
@CristianMatthiasAmbæk mrng
 
Anyone with a good solution to removing empty spaces in a String array? I fumbled around with this question myself which resulted in
//Using Apache commons array util
//List is another String array that i take each line from (for loop) and split on spaces
String[] split = list[count].trim().split(" ");

// Remove empty spaces in the array
for(int x = 0; x < split.length; x++) {
if(split[x].toString().length() == 0) {
split = ArrayUtils.remove(split, x);
x--;
}
}
 
7:45 AM
Morning
 
Do you want to remove all whitespace in each string in the list array?
 
Good morning @Vogel612
 
How about for (int i = 0; i < list.length; i++) list[i] = list[i].removeAll("\\s", "");?
 
or you go and abuse lambdas
Arrays.stream(list).map(s -> s.removeAll("\\s", "")).collect(Collectors.toList());
 
or Stream.of(list).map(s -> s.removeAll("\\s", "")).toArray(String[]::new)
 
7:50 AM
@aioobe you should become a regular here
maybe you can stop the rest of us from becoming labmda-analphabets
 
Thanks for the suggestions :) I will look at them and see what i can figure out
 
@Vogel612, you just taught me about Arrays.stream... Wasn't aware of that one. :-) (why on earth did they include both Stream.of and Arrays.stream?)
 
8:15 AM
I downvote most questions which attempts to use regex on HTML/XML when they are using a programming language.
There are plenty of that stuff among 100k regex questions, and honestly, they help nobody
 
The question we're referring to here wasn't about HTML/XML though.
 
@nhahtdh My question or what we talking about? xD
 
Yeah, I'm talking in general. The question's sample input is not HTML.
@CristianMatthiasAmbæk No
 
@CristianMatthiasAmbæk Not sure about the requirement, but why not split with " +"?
 
8:36 AM
@nhahtdh Oo that is beautiful and simple. But not sure why it actually works.
You say "split on whitespace (same as \\s) one or more times (+)"
Which result in a single white space split between words if you for example have a string "with more than one white space between words"
O dang the chat actually remove multiple whitespaces between words.
 
\s has more than just U+0020 space
 
@nhahtdh I dont follow (noob alert) U+0032 space?
 
@CristianMatthiasAmbæk Normal space
ASCII number 32
 
Sorry, should be U+0020 (hexa), and yes, it's normal space
\s includes tab, newline, form feed, etc.
 
So much to learn to get at a decent level :)

I find Java hhuuggee, especially regarding inheritance. And when to put stuff in between ()
 
fge
8:50 AM
@MadaraUchiha ASCII is dead
Speak Unicode :p
It just happens that code points U+0000-U+00FF are a 1-to-1 map with ASCII only for compatibility reasons
 
Did you know: \p{IsZYYY} is valid regex in Java SE
 
9:03 AM
@nhahtdh not when you put that in the String.
\p is not a valid escape pattern
' \\' '\t' '\n' '\r' '\"' are the only ones to my knowledge.
 
You don't need to escape '\"' when used as char though, you can use '"'.
 
@aioobe not in Java strings...
ya as char it's fine, but not in Strings, which are used for Regex compilation...
 
right.
 
@Vogel612 <_< I'm specifying in raw regex syntax
Of course, when you use it, you need to do proper string escaping "\\p{IsZYYY}"
 
9:20 AM
@fge unicode suckssss
I like typewriters no thank you :)
 
Morning @Gem
 
Morning
 
Morning all
 
 
1 hour later…
10:49 AM
adding background processes to java SE application will it affect user experience of the user?
java threaded environment
 
@Exbury Yes.
 
is there any way to minimize that effect?
So threaded back ground process will reduce performance of active thread. But overall it's peformance higer. isn't it?
 
@Exbury If you are talking about GUI applications, background task are used to improve User Experience.
 
It has an effect. That can be either positive or negative. For many applications the relevant metric is responsivenes rather than throughput, and there background tasks are useful even if throughput decreases
 
@kiheru Well, the question was indeed that ambiguous.. :)
 
10:59 AM
yes
(and considering most systems have multiple cores novadays, multithreading can increase performance if the task parallelizes well)
 
Hi
 
hi
 
For example i have GUI based application and Process some calculation(large amount of data). Also i need send it to remote database. making database sending part background
will it affect?
(send the results)
 
I am facing performance issues with spring boot when deployed as a jar file. Can anyone help?
 
@shyam Hi.
 
11:04 AM
It has an effect, and just the kind of effect you should aim for. Doing it in background makes it possible to keep the GUI responsive while the background task runs
 
Previously I tried packaging the entire thing as a war file and it was running smoothly :(
Are there any things in particular like changing any of the configurations required to optimize this sort of packaging?
 
(if there's nothing the user can reasonably do while the background task runs, it still enables displaying a progress indicator, or giving the user a chance to cancel the task)
 
Ok, it's my turn to ask a stupid question: How do I implement returnOneOf(Object, Object) which returns either of the two objects?
 
@Unihedron randomly?
 
@shyam Doesn't have to be random. I'm going for optimal.
I'm banking on return par1;.
 
11:09 AM
I'm wondering what are the possibilities you're thinking about.
 
@kiheru: exactly
 
I couldn't understand what's the question is?
guys i do you have experience in Single Sign On
 
11:35 AM
is there any possibilities to packet loss while rest communication
 
yes
 
fge
11:56 AM
Well, not if you use TCP
(by definition)
 
@fge by specification.
:p
 
fge
Well, the specification defines TCP, right? :p
Meh, anyway
 
nope
the dictionary defines TCP
literally
 
meh...
you can have packet loss with TCP
it's just made sure that you'll get the lost packets again
so...
 
fge
Which means you have no packet loss :)
If you do really lose a packet you get a connection error
 
12:10 PM
@Vogel612 I believe you mean dropped packets, which isn't packet loss
 
@Unihedron meh. on the IP layer it is packet loss
 
Then how can we ensure packet delivery in rest communication
what is the protocol rest uses?
 
fge
@Exbury more often than not this is HTTP over TCP, therefore you don't have to worry about packet loss
REST is not a protocol by the way
 
I know it's not a protocol. Thanks @fge
 
If you know that, why do you ask protocol questions then?
 
12:20 PM
Sry @Vogel612 i meant that i read rest is not a protocol. But i don't know how it communicates without packet loss
 
packet loss is a protocol thing... actually it's a problem of the IP layer and below
Do you know about the OSI layer model?
 
yes
but not deep
 
REST is somewhere in layer 5/6/7, depending on the flavor you use
packet loss occurs on layers 1,2 and 3
sometimes the abstraction of layer 4 is leaky (UDP, I'm looking at you) and then it's getting problematic for layers above that
but when you use the TCP protocol, layers 5 and above don't have to worry a bit about packet loss
because TCP hides that problem in it's protocol
 
got a clear idea. thank you
@Vogel612
 
@Unihedron, do you ever sleep? ;) I see you in chat, always.
2
 
12:33 PM
@esme_louise Nope. I work 24/7.
 
Teach me your ways! Sleep is unproductive.
6
 
But necessary..
 
@esme_louise Upload your mind to a server. If you're low on budget, just your computer can be enough, but make sure to add a safelock so it doesn't become skynet.
 
Necessary for us un-evolved beings. We must be upgraded.
@Unihedron Hahaha
 
12:40 PM
oof
Just now realized that count() is a terminal operation :(
 
Xd
n00b ;P
 
and even worse, instead of counting elements, it just does .mapToLong(ignored -> 1L).sum()
so there's no effective O(log N) combiner algorithm because that would first trigger an O(N) :P
 
fge
~sonarqube--
 
I guess I could count every 2N operations and populate N++ sequence, that would be O(2 log N) but oh well
 
fge
@Unihedron did you actually expect such an operation to be intermediate??
 
12:45 PM
yes, for some weird reason...
 
fge
o_O
 
Now that I think about it, that assumption was immaterial.
facedesk
ok fixed the bug caused by parallel streams giving up on parallel nature after a terminal operation :P
 
1:02 PM
gud ev
 
Evening
 
Good morning
 
noon
 
But..but.. its 9am here lol
Good nooning , kind of a mix of both worlds
 
doUnordered = collectorIsUnordered && !canDoParallel;
doParallel = canDoParallel && !doUnordered;
^ the most confusing logic ever
 
1:12 PM
Wrapping exceptions' e.getMessage() is the same as the cause, right?
 
I saw it in android room :nyan
 
cause --> cause of exception?
 
@deadlydragon00 NOOOOOOOOOOOooo there goes my productivity
 
@ItachiUchiha Yeah
throw new Exception(new Exception("foo"));
Will the outer exception's .getMessage() return "foo"?
 
Hi guys, assuming I know the basics (probably have to learn IO and Concurrency though), what should be my next steps? Any advice?
 
1:14 PM
B-)
 
@MadaraUchiha It should
 
@MadaraUchiha If you didn't pass a String cause through its constructor, but only an exception object, it should create a new Exception object with the cause message from the exception you pass in
 
it's what the javadocs says (dun keel me pls)
 
@Unihedron I don't mind Javadoc when it's helpful
More often than not, it's not (vague, one line explanation with no examples)
 
1:16 PM
Need ... next ... step ... advice
 
@Beko It depends on what you mean by "I know the basics".
Very often than not a learning programmer takes a language syntax (excluding convention, algorithm design etc) as basic, while some other ambitious measurements even cover TDD and SOLID (and paradigms alike) as basic.
 
@MadaraUchiha Java 8 docs are very interesting..
=javadoc Task
 
@Unihedron Well, it's more than just "I know what int a = 5; does". I'm capable of solving fairly difficult exercises. I don't know about those paradigms though.
 
/javadoc Task
 
@ItachiUchiha javafx.concurrent.Task: A fully observable implementation of a FutureTask. Tasks exposes additional state and observable properties useful for programming asynchronous tasks in JavaFX, as defined in the Worker interface. An implementation of Task must override the javafx.concurrent.Task#call() method. This method is invoked on the background thread. Any ...
state which is used in this method must be safe to read and write from a background thread. For example, manipulating a live scene graph from this method is unsafe and will result in runtime exceptions. (1/71)
 
1:23 PM
@Beko I would recommend exercising your ability to the point where you find your field of specialization.
Sites like codingbat.com are good for starters while other new beta sites like codewars.com sets off to build repositories of interesting code challenges.
 
@Unihedron What would those include? Field of specialization as in GUI, IO, etc? I've solved most of the exercises on codingbat. I'll check out codewars though
 
@Beko Data science, software development, ...
 
!!help
 
@deadlydragon00 Information on interacting with me can be found at this page
 
they all write code but the specialization is different
 
1:26 PM
@Unihedron Oh ok. Guess I'll have to find out what actually they do.
 
By the way, if you sign up on codewars, using "Stack Exchange" as your clan grants you access to a leaderboard of SO users to climb through.
 
@Unihedron Much appreaciated!
 
maybe I should start climbing over there, too...
eh well..
I've just changed up the #stackoverflow DH ciphers to a 2048-bit group on all load balancers. Really though, stop breaking TLS people.
what's wrong with TLS??
 
@Vogel612 weakdh.org
TLS IS BROKEN
 
oh okay...
 
1:48 PM
Worst part of Engineering is the documents... so many god damn documents
documents for dayz
My coworkers been writing documents for over a month, very glad I'm not her right now
 
@Dustiny Documents are important. Please consult @fge ..
 
Hey, it's better than ending up with millions of lines of code from 5 years ago with no documentation.
 
As long as I don't dream of writing documents I can handle it, lol. She tells me she writes documents in the day, then writes documents in her sleep. Sounds kind of like torture
Yeah don't get me wrong, they are definitely important, especially for big projects or projects for very standardized industries like nuclear power industry
 
Nuclear power is controlled by automation instances.
 
Honestly, I'd kill for self-documenting code or documented subsystems at my job, and my company sells sheet music.
We have a few public APIs that people use, and a spaghettified system for selling products wholesale to dealers that is pre-Struts
none of which are documented
 
1:55 PM
@ShotgunNinja haha I know those feels. I'm not exactly talking about the code itself as oppossed to software development plans, computer system design documents, etc
 
Documentation isn't just for nuclear power plants; it's for any significantly complicated or historied subsystem.
And it's important.
Obviously it's not important for throwaway code, or for systems which are sufficiently simple
 
@Dustiny wtf?
 
I've had an electrical engineer friend at one of my internships do that
 
^^ I pity her
 
Her job was to document an induction heat-treatment power supply, what each control did, what all the tolerances were, how every part fit together, etc.
 
1:58 PM
Oh yeah same here Itachi haha. I'm pretty sure she has atleast another month of documents left too lol at least
 
@Dustiny you don't work for Radyne or Inductotherm, do you?
 
Haha no, a small consulting company. The project is for monitoring the electrical subsystems of the subway and streetcars in toronto
 
@Dustiny Don't you document the code you write?
 
So the documentation is definitely important, I just feel bad for her lol
Depends. The client I've been working with has no requirements at all for actually documenting it specifically. But I leave comments inside the code so the next guy dealing with it knows what's going on
I created a systems design document for it too, but thats about it
Oh and testing documentation
 
documents beside the code? that is good and bad at the same time
 
2:03 PM
The only document other then the code I did was just to give a general overview of the entire system of all various functionality inside of it
Which is really just an internal document for our company
Is that what you mean?
 
fge
grants SonarQube's dev@ mailing list the title of Most Unhelpful Development Mailing List of 2015
 
@fge ... that's bold :p
 
@fge You clearly haven't met the PHP mailing list.
 
madara is it possible to hide my own website from google spiders?
 
@deadlydragon00 Don't put it on the internet?
 
2:07 PM
-_-
 
TBF, Google's crawler is "well behaved", so you can safely filter by the user agent string
It won't stop other crawlers.
 
@deadlydragon00 use robots.txt
 
fge
@MadaraUchiha OK, then make that the most unhelpful Java development mailing list; I don't do PHP, so I can't give an opinion
 
@fge You're one of the lucky ones.
I'm scarred for life :(
 
fge
But they are truly unhelpful
 
2:10 PM
@Unihedron hows that help?
 
fge
I have asked several questions; I haven't had a relevant answer even once
 
@deadlydragon00 Google's bots behave
 
fge
All they can say is "go see the examples" which are as documented as the API is -- the desert
Frankly, that's infuriating
 
@deadlydragon00 robots.txt is a file that's optionally followed by robots and crawlers
Google's are well behaved, so if you ask them nicely in the robots.txt file not to, they're likely to not crawl you
 
Ah Ok I learn something new :P, BTW tnx
 
 
2 hours later…
3:53 PM
The run book for this service is a document literally telling me to run.
Exactly my thought on Spring documentation
 
XD
 
4:09 PM
If anything has "run book" name in it, it is definitely not worth looking
Same way it could say "Search on google", even these are two different meanings, the effects are similar :-)
 
@fge kinda old :p
Numberphile and Computerphile makes the best documentaries; too bad I don't have time to watch all of them
/javadoc HashMap
 
@Unihedron java.util.HashMap: Hash table based implementation of the Map interface. This implementation provides all of the optional map operations, and permits null values and the null key. (The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls.) This class makes no guarantees as to the order of the map; in particular, it does not ...
guarantee that the order will remain constant over time. (1/10)
 
4:34 PM
/javadoc Throwable
 
@Andrew java.lang.Throwable: The Throwable class is the superclass of all errors and exceptions in the Java language. Only objects that are instances of this class (or one of its subclasses) are thrown by the Java Virtual Machine or can be thrown by the Java throw statement. Similarly, only this class or one of its subclasses can be the argument type in a catch clause. For the purposes ...
of compile-time checking of exceptions, Throwable and any subclass of Throwable that is not also a subclass of either RuntimeException or Error are regarded as checked exceptions. (1/7)
 
/javadoc Exception
 
@Andrew java.lang.Exception: The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch. (1/2)
 
/javadoc toJSONObject
 
@Andrew Sorry, I never heard of that class. :(
 
4:35 PM
@OakBot should say "it's not part of jdk"
 
@Andrew Type /help to see all my commands.
 
hrrr
ps. Dont care about your hearing ;-)
 
5:03 PM
http://www.commitstrip.com/en/2015/05/20/coder-interview/
CommitStrip - Blog relating the daily life of web agencies developers
Coder Interview
CommitStrip
1432141028
 
5:55 PM
yawns
 
@ItachiUchiha go to sleep if you're tired :P
I am, it's 2am
 
I should, but I don't want to :P
5 hours ago, by esme_louise
Teach me your ways! Sleep is unproductive.
@Uni did you forget?
 
1
Q: ssh access to my DD-WRT router TP LINK WR1043ND

richardi would like to copy to the tmp file on my router and do not know how to SSH it to access it. i am connected to it via lan and am running OSX snow leapoard 10.5.6. pls help

user image
2
 
6:04 PM
Fuck AWS...
I create my first sample application using PHP and it doesn't show up :P
 
@MadaraUchiha I laughed :P
 
@uni go back to the dark ages
 
@ItachiUchiha What?
You make nearly no sense. Did you have your cup of coffee yet?
 
@ItachiUchiha y u use aws for that?
Expensive
 
@MadaraUchiha Yes, I know. I am just trying out things.
 
6:06 PM
@ItachiUchiha $$$$ use a free host
 
@uni nope :P
@MadaraUchiha I am in fact using a free version on AWS
 
OK
Have you set permission for your files properly?
If the apache/nginx user can't access them, it won't work.
 
I haven't ssh'd to my server, I am just trying out the web console :)
 
@Unihedron "How do I enable SSH for my router?" "By enabling ssh for your router"
@ItachiUchiha Doesn't cpntradict
 
6:09 PM
What be wrong?
 
The error log does says few things
 
@ItachiUchiha Does it fail though?
I see sigterms and such, nothing PHP related
 
@MadaraUchiha Resolved. I had directed my health-check to an invalid url..
<--- N00b
 
'tis OK
Although I'm not sure why you'd learn PHP in the first place :P
Planning a transition from Java?
 
Nope, not at all. I was just planning to design a blog (as you already know) in wordpress.
So learning tits and bits.
Java would be an overkill for a simple blog.
 
crl
6:24 PM
do you guys use UML professionally? if yes which diagrams (class, sequence, use-case,...)?
 
@ItachiUchiha Java blog? xD
 
crl
and which software (visualParadigm, ...)?
 
I have used class / sequence diagrams for my project using an eclipse plugin :P
and once using RAD
 
crl
ok, thanks
 
@Dustiny lol, nope. I am not very good with Java basics. If anyone should write a blog on java tutorials, it should be @fge :P
 
6:28 PM
Haha I am intrigued.. I've been throwing a thought around the old head-bucket about starting my own blog
But mine would probably be more of rant-blog, or random lifestyle kind of stuff
 
That would make it a personal blog
 
crl
other question: if you worked at something like Amazon and had to model in Java their whole system, how would you model each type of product? a hierarchy of classes (possibly a lot..) or some smarter way?
 
Yeah.. maybe some sort of help blog, or a mix. I don't know. What are you going for? Im interested to know
Don't have to spill the whole thing just the generality i guess
 
crl
the thing is how to have "objects" for the products with each different properties
how to model a huge taxonomy?
 
@Dustiny It is a personal blog for pet lovers.. :P
 
6:34 PM
Oh neat!
 
@crl use a combination of interfaces and classes..
 
crl
so a class for each item type, and interfaces to manipulate them
 
I am imagining it would be quite an extensive hierarchy
 
yeah
 
crl
other example: Wikipedia, imagine how they model all their hierarchy of things
 
6:41 PM
@crl You should start with something smaller :P
 
Yeah wouldn't wikipedia be very complicated though with all of the cross-referencing between unrelated topics
 
@crl With Philosophy as the root?
 
crl
:D
 
@ShotgunNinja If we really want to get Philosophical wouldn't language be below that? ;)
or I guess the root of philosophy is what I meant there (I was thinking real life tree and gapped when I said 'below' lol)
 
You do know what I was referencing, correct?
 
6:45 PM
Originally thought you meant everything would be a subset of Philosophy but now that I re-read it, thinking it was in direct reference to what he said lol.
 
crl
Clicking on the first link in the main text of a Wikipedia article, and then repeating the process for subsequent articles, usually eventually gets one to the Philosophy article. As of May 26, 2011, 94.52% of all articles in Wikipedia lead eventually to the article Philosophy. The remaining 100,000 (approx.) links to an article with no wikilinks or with links to pages that do not exist, or get stuck in loops (all three are equally probable). The median link chain length to reach philosophy is 23. There have been some theories on this phenomenon, with the most prevalent being the tendency f...
 
Ah thanks for that lol
Damn this is interesting lol
 
Wikipedia is blocked for me
 
What?
Why?
How?
 
which is funny; all roads lead to Philosophy, but they're all closed.
@ItachiUchiha I'm at work.
 
6:48 PM
Yes, so what? It makes no sens to block wiki at work
 
Stupid Barracuda Web Filter set up for the marketrons.
Basically, people in other departments were spending their whole day on Wikipedia instead of getting work done
I'm just glad Chat.SO and SO weren't autoblocked
 
Philosophy is awesome. Also that's weak. Funny how they didn't really deal with the root of the problem, which would be the people and not Wikipedia.. but yeah definitely thankful
 
 
4 hours later…
11:18 PM
@ShotgunNinja Can't you SSH out?
 
11:57 PM
@ShotgunNinja I don't know your situation, but I think you should stick with the job. Your boss doesn't sound like a total jerk. He sounds like someone who is open minded about new ideas, but is overwhelmed with business stuff and can't devote much time to R&D kind of stuff.
It sounds like you want to be in an environment where you can learn better software practices, though.
That's probably hard to get when your working with 10+ year old technology that was never properly implemented.
 

« first day (1670 days earlier)      last day (3263 days later) »