« first day (3287 days earlier)      last day (1656 days later) » 

12:00 AM
There are two ways to write error-free programs; only the third one works. (source)
 
 
2 hours later…
2:08 AM
dreams of electric sheep
 
 
4 hours later…
5:43 AM
Good morning noobs and nerds!
 
good morning, as parallel programming is incrementally overtaking, should a developer start mastering this concept from know - knowing that one of it's disadvantage is big learning difficulty - or should he/she keep up of what's he doing in concurrent programming technology
 
Is there really a difference when doing high-level programming?
 
6:33 AM
@eng.mohammad Only you can answer that. If you get completely stuck, try a different learning approach. Otherwise, just go for it. Doesn't really matter how you go about it as long as you understand and learn.
 
6:46 AM
@eng.mohammad you should learn parallel programming, yes
At least to the extent that you understand what risks there may be when multiple threads are running your code, because that comes up fairly often
It ultimately boils down to two things: 1) thread A needs a resource held by thread B. If thread B could needs resource held by thread A, you've potentially created a deadlock situation
know how to avoid that scenario (most times the solution is not have each thread know about the other or share resources)
2) thread A is modifying shared resource X at the same time thread B is reading resource X
know that if this is done at the same time, thread B may read inconsistent values
 
All of that applies to concurrent programming as well though or am I mistaken?
 
You need to ensure all write actions are transactional or that shared resources are immutable
@geisterfurz007 not really distinguishing parallel programming and concurrency
honestly is there a difference?
 
That's what I meant with "Is there really a difference when doing high-level programming". Concurrent just generally means stuff happens next to each other (includes virtual parallelization by time slicing) while parallel is a subset of that where threads actually run at the same time.
From my understanding the way how stuff is made concurrent is up to some form of abstraction layer (the OS I think but chances are that that is wrong)
 
meh, you'd have to consider this sort of thing in either case
could be parallel and is parallel are handled the same way in code
though in some instances you don't really have to worry about deadlocks
like in the case of multiple threads each performing similar but separate tasks
 
@geisterfurz007 you create a software program that has parallelized execution, but it is the OS that decides at which core it is being handled. It may happen that one logical core is being used, even if you requested 4 threads.
 
6:56 AM
Oh! It looks like I did learn something in college then :P
 
@Neil not true. The OS cannot foresee deadlocks. It is the program that has the responsibility to prevent deadlocks. If there is a deadlock, the OS just see a virtual thread being in busy state. When other programs is requesting for threads, it just give an other one from the available pool
 
morn
o
 
morn
 
morno!
 
however, AFAIK there are measurements to not give threads to a given program anymore if it has a stalled thread running (or limiting it).
 
7:00 AM
Hey @geisterfurz007 :) How's things
 
I am doing extraordinarily well, thank you :D
How are you?
 
@Zoethetransgirl Eh ...
 
@KarelG If you spawn 10 threads which all have their own data separate from one another and perform some calculation, you cannot have deadlocks form
 
@geisterfurz007 Just came back from my 2 week vacation that felt like 3-4 weeks, so I'm feeling pretty chipper myself
 
Oooooooh noice!
 
7:04 AM
you can only get a deadlock if you're sharing something between threads
 
Where have you been?
 
@wonderb0lt hue hue, the bird in Cities Skylines game is named "chirper"
 
@geisterfurz007 Salzburg, Graz and Berlin
 
@Neil yeah, resource sharing is often over-looked at
it is complex, but you can make it simple: if the shared information is going to be immutable (such as no writes), just make copies of it
then use it
really. But I hear then "but then it is using more memory and ect"
best to be safe
If I leave this company then they will have problems with maintaining the services I have built. Transactional processing is not well-versed here.
 
I still got 12 days of vacation that I gotta waste this year. Suggestions where they should go?
 
7:14 AM
@KarelG same
 
@geisterfurz007 if you don't give a budget, I could say any remote locations :P
 
I was surprised to find out that if you check if an account has money to deduct and then you deduct it, using our own framework, you risk to put an account in negative
 
I was more looking for dates :P
 
dates?
 
This is because there may be multiple deductions on the same account (checks are done prior to actual movement of the money)
 
7:15 AM
no saldo check? o.O
oh
keh
 
Suppose you have to deduct 10 euros from someone's account and they have 15
So you say, yes! Do the movement!
 
I would reserve it first
 
So the first payment and the second payment for the same account of 10 euros..
they're both green flagged
So the account goes to 5 euros and then to -5
 
@KarelG Yeah. I don't know on which dates I should take my days off.
 
can you not request it?
 
7:16 AM
I already got the time between christmas and new year + a week before that and stuff
 
I made it so that you are free to request whenever you want to go on holiday here
just do it on beforehand if it is for more than 3 days
I don't care. You have x days of holidays in a year. Spend it whenever you want to spend on
 
Yeah I have to request it. But I don't know when ._.
Immam do a random date generator
Still 7 days :')
 
heyoo geisboy
 
random date generator returns 17/09/177244627172
 
@geisterfurz007 nearby EU countries?
 
7:24 AM
fml :P
 
lol
@geisterfurz007 we dont sell dates here
 
Noice!
Not where I should go >.>
But thanks :D
 
you know ... if you ask this way
> Suggestions where they should go?
then we would think for locations
not fucking days
 
watch your fucking language :P
Ye, where in the calendar (:
 
that really depends of when you can go and the destination
and what's being available (flight tickets?)
I have been to Cuba and Mauritius this year. I still have days left :P
I am planning for Israel the next year. Gotcha see Tel Aviv :3
forgot that I went to Sicily as well (last June)
 
8:02 AM
cuba is not in my calendar xD
 
Oktoberfest may be :P
 
._____________________________________________________________.
I have no clue what to make of this...
IJ000311: Throwable from unregister connection: java.lang.IllegalStateException: IJ000152: Trying to return an unknown connection: org.jboss.jca.adapters.jdbc.jdk8.WrappedConnectionJDK8@223bb7fc
All answers I could find were something like "Yeah you are using a session or something that is already closed" but I am not doing session management.
I get all information from the JPA query that causes that issue though (it looks like it at least) so I am not sure if I should just ignore it but it doesn't look like something to be ignored.
> Sounds like your application is lcosing the connection twice. Fix your app.
Ok, thanks.
 
are you reading from a question or is that from another chat channel?
 
@geisterfurz007 sounds like you need @Transaction or @Transactional or something
 
That quote is from a coderanch.
 
8:11 AM
it sounds similar to when you use a Spring Data repository with a Stream output
 
How do I use that?
 
[shift][2] [shift][t] [r] [a] [n] [s] [a] [c] [t] [i] [o] [n] [a] [l] [enter]
 
Shift two is a double quote.
 
stupid keyboard
 
The issue occurs when I submit a JSF page. It refreshes and should load some data from the database. Most of it works, just one set of data eats shit each time.
 
8:24 AM
@geisterfurz007 are most of the info there not so relevant anymore?
 
I am clicking every link that looks like it might have something to do with the issue! ... Eventhough that one was already 9 years old ._.
I found some that were 15 years old as well too!
 
If i was you, I would search in jboss issue tracker for IJ000152
 
if I were you, I wouldnt use technology that is broken for 15 years
 
If I were me, I would look for a way to leave this compa- oh wait, I did :')
@KarelG Only an example that is apparently not reproducing the issue and one that is unresolved since 2017 and has a link to a redhat solutions page which is for logged in people only -.-
But good suggestion, thanks :)
 
geister, do you use faseconvertor ?
 
8:31 AM
Dunno what that is so I guess not?
 
mo
 
you need to add more info on your problem tho
"submitting a JSF page" is vague
 
hm
that might have given me an idea
hang on
 
Hi anyone knows Spring testing
?
I wanted to commit the data into data base and before executing method and rollback after executing method
 
8:48 AM
@user3094331 you can't rollback after committing?
if anything, open a transaction, perform that change, call the method using same transaction/connection, rollback afterwards
you'll see a version of the database affected by your changes, but changes aren't committed
 
got it , but data is not committing into data base
 
isn't that the point?
 
@Transactional
@ContextConfiguration(classes = IntegrationUnitTestCaseConfiguration.class)
@RunWith(SpringRunner.class)
@SqlGroup({
@Sql(
config = @SqlConfig(dataSource = "datasource1"),
scripts = "ebcs.sql"),
@Sql(
config = @SqlConfig(dataSource = "datasource2"),
scripts = "items.sql")
})
 
> deploy
IDE: set PROFILE = production
ABORT ABORT ABORT ABORT
 
@user3094331 yikes
 
8:51 AM
the data inserted by one data source not able to ready by another data source until and unless the data should be committed
we have this requirement in our junits
 
ok, well in that case it's easier
 
@user3094331 Please edit that message and hit Ctrl+K before sending.
 
simply run the script and commit, afterwards, run your test
 
how to roll back after method complete exectuion
?
we have 8 methods in my test class
 
transactions aren't made like that
If you run script A and you don't want to commit the changes but you want script B to see those changes and you want script B to be committed.. you can't
you risk to shoot yourself in the foot
it's all in a transaction or nothing is
you can't just commit the parts you want, especially if it depends on the data from the first script
You could insert a parent row in script A, and then a child row in script B, then commit B, and rollback A and have an inconsistent state
 
8:54 AM
@KarelG I think I can get away with not updating the entire form after clicking the commandButton that eventually leads to an entity being updated in the database but just the subset of controls that really need updating. Which would exclude the data that is currently loaded as well. Thanks!
 
my question is I want the scripts to be executed for test method and the data should be committed and rolledback
after executing the each test method
 
you can't both commit and rollback a transaction
not unless you have multiple transactions
 
for each test method I want to commit the data and rollback the data
 
3 mins ago, by Neil
you can't both commit and rollback a transaction
 
@Neil Not since the accident.
 
9:06 AM
@Transactional , How to commit the data into data base?
 
Oh! MY GOD!
 
@user3094331 commit is a finite action. The changes made cannot be undone. Just delete your records
 
Is that the real Madara Uchiha?
 
@MadaraUchiha I had to look up that reference
@geisterfurz007 no, the real Madara is a fictitious character, silly
 
but how to commit the data
using @Transactional
 
9:09 AM
execute it
 
normally @Transactional, wont commit data into database
 
@Neil I don't get it ._.
 
@geisterfurz007 it's obviously a fake
 
@Neil O-o
@Hans1984 Quite convincing with the blue lettering though!
 
true
well made fake
 
9:10 AM
@geisterfurz007 "Not since the accident"
 
@geisterfurz007 WHERE?!
 
Can't find him anymore. Just rushed through a few minutes ago :/
 
*pssh* look at the mirror.
 
9:18 AM
did it break? 😲
don't worry. It is expected
 
as long as it broke for the right reasons
 
It couldn't handle the pure beauty (and amount of javascript oddities present in this almighty being)
Yeah, I got it working. Not really addressing the issue that I got but worked my way around it. Thank you @KarelG
 
9:35 AM
I'm glad that I ... inspired you somehow
 
You wanted more details on the "Submit JSF" stuff so I wrote that and the stumbled upon what I could change :)
 
USM
Hey Guys
How much time should we wait for an answer
then post it here?
 
Few days :)
 
USM
:(
 
9:59 AM
@USM it is not even60 minutes old?
create a class to represent your CSV row lol.
then define a comparable with it
that multivalue stuff ... meh
 
I am confusion... I got a JPA entity that represents a student including a reference to an entity that represents a school. I am fairly certain that the mapping is correct however when setting the school for a student and then saving it, the foreign key remains empty in the database. Any ideas why?
 
@geisterfurz007 check for errors during update
 
also, you are updating it right?
it isn't enough just to set a student's school on the entity you know
I'm guessing you are though
are you rolling the transaction back?
do other updates take and only the school update fails?
 
Oh
lmao
ignore that
I may or may not have been connected to the live database and not to the test database in SSMS :')
 
10:14 AM
hah
i'd tell you that you're an idiot, but I've done similar things :)
thankfully in my case production database is unobtainable
 
That was the thing with not being an actual programmer :D
 
but i've connected to preproduction database that way
 
We got nothing like that. Chances are that our test Wildfly is going to serve the production applications as well. What could possibly go wrong :)
 
don't see anything wrong there
no chance to screw that up
 
Not at all! And no chance that a user might hit a dev version by accident and is going to be able to run under higher privileges because devs like to skip login after each deploy :)
 
10:20 AM
no way
that kind of thing only happens in the movies
 
Hi
 
@mohitmonu Welcome to the Java Chat, the room for Java enthusiasts! I'm Oak, one of the room's bots. If you want to ask a question, just ask it and someone will respond if they feel like it. But remember that this room is not a help desk or tutoring service! If you want to just hang out, then welcome aboard! Oh, and the room's full list of rules are posted here.
 
How to do API rate Limiter
there is code for somewhere
 
track incoming requests
 
10:30 AM
You would keep a list of the IPs that made requests (or only the ones that made bad requests) somewhere and track their requests (maybe include timestamps). Each time someone does a request, do a lookup of that IP's prior requests and check if they passed their limit. If they did, return a response that indicates that.
You can stop there but you can also add punishment for clients that don't respect the limit properly and just continue sending requests. In that case you'd have an additional field per IP which indicates the cooldown that IP has left and increase if needed.
 
use a token for access and use it as an identifier to track # of requests made by a given user
@geisterfurz007 tracking by IP is stooopid
 
Oh yeah! Token is actually better than IP :D
 
10:53 AM
how to do that
 
o/
 
\o
 
:')
 
11:57 AM
posted on October 23, 2019

archive - contact - sexy exciting merchandise - search - about ← previousOctober 23rd, 2019nextOctober 23rd, 2019: I hope this concludes the sandwich debate once and for all!– Ryan

 
The word "oysterhood" means "reclusiveness" or "an overwhelming desire to stay at home." (source)
 
Word is shit.
 
@Feeds hahaha. Come on guys, you can't tell me that one isn't funny
 
It's quite a lot of text. I don't know if I want to read all that.
I could spend that time figuring out WHY WORD DOES NOT NUMBER THE FUCKING HEADINGS!
And no, it's not funny :)
 
@OakBot I got a lot of oysterhood feelings
 
12:07 PM
@Hans1984 Type /help to see all my commands.
 
1:06 PM
is there any logger guideline which can help me with minimizing debug logs
so that the user should not be able to figure out logic of the program or reverse engineer it
?
 
@gaurav you should only show debug output when you are debugging, you should disable that in your final build. Have you looked at log4j or slf4g? there are many solutions for this.
 
@bot_bot Not necessarily. What if there's a production issue? I can change the level to DEBUG, perform operation and tell the user to email logs. Right?
 
your application should mail the logs... or send them somehow to your server
 
Yes, but in that case I'd try make the application email the logs automatically, without any involvement of the user
 
in our logging framework, debug and trace logs are included when an exception is thrown
 
1:18 PM
same here, but the user doesn't see any of that.
Is it considered bad practice to let a service write to the socket? For example, using Spring boot my controller passes the OutputStream from HttpServletResponse back to the service so it can write data to the socket. Is this OK? what's the best practice if it isn't advised? I'd rather not have business logic in my controller
.... this is a Spring Boot application if that has any baring on the answer
 
@Wietlol @bot_bot there is a facility to send mail in case of exception while using the application. But, it contains the logs with the default log level and the exception stacktrace.
What I am looking for is a guideline/standard using which we can minimize the exposure of application logic to the user.
He/she should not be able to figure out the algorithm by setting log level to debug
P.S. I use log4j2 framework.
 
don't ship the stacktrace. Only show the message
keep the rest of the info for yourself
tf why are you sending logs to the users of the applications?
 
@KarelG correct. But the actual logs are still present along with their stacktraces in the web-app directory.
The user can still go to that directory, turn on DEBUG logs and figure out the code logic.
 
1:33 PM
don't allow level configuration?
just on/off for top level log types (error).
but even with that.... again
> tf why are you sending logs to the users of the applications?
 
@KarelG if I don't allow level configuration, then how will I be able to debug any production issue?
 
don't allow only for them
 
I am not sending logs to the users of the applications
When the application runs, it stores the logs in web-app directory
@KarelG interesting.
 
1:52 PM
 
@bot_bot yes. will check it out!
 
2:09 PM
FYI- noticed that even windows stores its logs in proprietary .evtx format
which can only be opened in event viewer utility
 
 
2 hours later…
4:31 PM
Aloha; anyone familiar with JMS (using the Spring annotations to set up listeners)? I'm trying to understand how to configure my application to deliver messages to all applicable listeners, rather than just the first to ack the message.
 
 
3 hours later…
7:34 PM
 

« first day (3287 days earlier)      last day (1656 days later) »