« first day (1810 days earlier)      last day (3117 days later) » 

2:55 AM
@Kylar lol
 
 
1 hour later…
4:01 AM
I'm experiencing an odd error. I can print an item from an array, but when I try to return it, I get NullPointerException. What would be the cause for this?
 
4:51 AM
@Tanner are you sure you are properly handling the references you deal with?
 
 
2 hours later…
fge
7:07 AM
@Tanner show the code (in a pastebin)
 
Morning X_X
 
7:27 AM
Morning
 
7:38 AM
Morning!
 
morn
 
7:54 AM
I suppose I'll just get it over with before I start: (ノಠ益ಠ)ノ彡┻━┻
 
morning Java
What is the language and platform SO used? java or PHP or Ruby ?
 
fge
8:32 AM
memoryfilesystem rocks
 
8:53 AM
@Dustiny "What are you in for?" - "Everything"
@JudeNiroshan C#
 
9:22 AM
interesting.
1
Q: Java different approaches to handle if null then new

Daniël van den BergOkay, I've got a question about handling nulls. This question can be heavily based upon opinion, therefore I'm going to ask about pro's and cons. Let's say I've got a function that can return null, or a JSONArray. I always want a JSONArray, so I want it to create an empty one if the function's r...

 
fge
@JudeNiroshan yeah, I saw that question and commented on it
 
@fge me too :D
not properly organized code base.
 
fge
null has few legitimate uses, honestly
Note: "few", not "no"
 
how do we differentiate it ?
 
fge
sigh I cannot really tell; I just "figure it out" as I go
 
9:35 AM
I mean "few" and absolute null
oh oohhh
 
fge
null is null, there is no "absolute null"
 
3 mins ago, by fge
Note: "few", not "no"
 
fge
When does it make sense to return null on a method? When does it make sense that an argument can be null?
 
didn't get it
 
fge
I don't see any absolute rules to it
I just figure it out when I design the APIs that I make
And if this is the case I make sure to use JSR 305 annotations
Generally I only ever use @Nullable and, in the doc of the class, say something like "Unless otherwise annotated by @Nullable, methods in this class may not accept null arguments or return null values; null arguments may cause methods to throw a NullPointerException and are an indication of a programming mistake"
Or something along those lines
 
9:39 AM
Does Java have default values which we can assign for arguments ?
 
fge
Method arguments, you mean?
No it doesn't
 
fge
Eh?
Well, read the answer
The answer is no
 
hm.. yes. I mean that :)
 
10:01 AM
o/
 
o/\o
 
10:58 AM
\oo/
 
11:20 AM
@fge @ArgumentsAreNonnullByDefault @ReturnValuesAreNonnullByDefault
 
fge
Err
There is @ParametersAreNonnullByDefault
But nothing of the sort for return values
Not in JSR 305 at least
 
lol I just made it up
I usually add @ParametersAreNonnullByDefault to the package header at package.java and hope for the best, not sure how good that reaches though
 
fge
Even then, and if the annotation is @Documented, is it not clear in the default javadoc where this will appear; so added javadoc still remains the best way to go :p
@Unihedron that's the problem; not very visible...
 
@fge it's visible enough for the code inspection instance to find, I think
 
fge
The default javadoc layout does not make it easy to navigate to the package documentation level
Indeed, and FindBugs, and many IDEA inspections, make use of that
But as to the documentation of these, that's another story
The SonarQube API makes extensive use of @ParametersAreNonnullByDefault at the package level, but I'm only ever aware of this when I write some useless checks in code
It's not obvious otherwise
Also, I still have trouble as to why JSR 305 defines both @Nullable and @CheckForNull
 
11:35 AM
@fge CheckForNull = null is part of the contract to indicate behaviour that should be double checked
 
fge
@Unihedron but then why doesn't @Nullable fit the bill as well? If a return value is potentially null, my view is that @Nullable has the same effect
 
Nullable = return value may be null
CheckForNull = if return value is null, you should handle it
 
fge
Hmm, OK...
Well, no -- I mean, if the return value is @Nullable you know you have to handle it
OK, I'm lost
 
@fge even if null is a possible and natural value?
 
fge
11:46 AM
@Unihedron sorry, I don't understand your point
 
.findLargestSphere(); // returns null if there's none
.findLargestSphereOrBlowUpTheWorld(); // returns null when the world is blown up
 
fge
Sorry, not convinced...
Question it is
 
@fge I'm not concerned whether you're convinced, but you did ask
 
fge
Yes, I did, and I'd like an answer as to why there are two different annotations for that; the discussion thus far has not convinced me about the need for @CheckForNull
 
thankfully you're not the maintainer of jsr305 annotations :p
 
fge
11:56 AM
sigh
Anyway, question asked
OK, so it's for FindBugs only
 
12:48 PM
Morning, Java!
 
me@enterpriseLaptop C:\git\stashbot
> vim .gitignore
'vim' is not recognized as an internal or external command,
operable program or batch file.
I'm not a smart man
Stupid ConEmu making me think I was in a halfway decent shell
 
@wonderb0lt could tell from C:\
 
Who needs vim when you have Notepad!!!
 
@Unihedron It's not like I have a choice
git config -e opened vim though so it has to be SOMEWHERE
 
Does vi work at least?
 
12:57 PM
no but I think it's just not on the PATH
 
@wonderb0lt What's the value of the GIT_EDITOR environment variable?
 
not set
 
> The order of preference is the $GIT_EDITOR environment variable, then core.editor configuration, then $VISUAL, then $EDITOR, and then the default chosen at compile time, which is usually vi.
Try: git var GIT_EDITOR
 
> git var GIT_EDITOR
vi
:D
it's alright, I'm setting my cygwin bash up as we speak
 
hrmph... gradle is not playing nice..
anyone here set up gradle with lombok?
Morning btw.
 
1:07 PM
morning
 
intelliJ uses it just fine...
 
@Michael Notepad++ !
 
1:25 PM
@Dustiny That would be acceptable. xD
 
remember to notepad-- after using it
 
It fulfills all my text editing needs when I'm too lazy to open up a IDE
lols^^
I need to start going to bed earlier.. so fricken tired
 
@Dustiny Just dooooo it!!
 
you have too little stamina
for a programmer
 
Programmers don't need to sleep.
 
1:39 PM
wow... now I am confused.
 
@Vogel612 You're welcome.
 
something different...
 
Dang it @Mic, stop being helpless!!
 
it seems that lombok does some strange things with final methods..
and I am an idiot.. brb.
Repro is borken.
 
@Vogel612 Well, we knew that much. xD
JK JK
 
1:42 PM
it's funny how you can Delegate final methods, as long as you don't actually extend from the class you wrap...
 
@Unihedron What? I thought that's what we did here.
 
1:53 PM
that's more understandable..
 
It's rather simple. We kill the batman. xD
 
actually that is exactly what might happen.. Delegate is in the experimentals anyways.
 
@Unihedron I have tons of Stamina
Stamina required for drumming > Stamina required for coding haha
 
fge
Roll a d20 for Constitution check after 2 hours of programming against a DC of 15; roll another d20 every 2 hours; the DC increases by 4 every 2 hours. If a coffee is taken inbetween any 2 hours, the DC decreases by 8. Epic feat Coder: you no longer fail on a natural roll of 1.
 
2:09 PM
Totally unrelated question... is there a video of the hangout?
 
dunno
 
Time to write an engineering design document describing 50 screens of a UI, wooo.... kill me
 
I don't want to ask...
but... why would you describe a UI in text-form?
 
fge
@Dustiny could be worse; you could have been ordered to write a functional design document
 
@Vogel612 It's an HMI Design specification
For our Subway SCADA system project..
 
2:13 PM
whatever the crap that is.
 
Basically it's a 4 year project, and the first 2 years are design
@fge Ahhh well I did that a few months ago, lol D:
Basically, welcome to engineering <_<
(at a small company atleast)
I can't really complain though, the experience I'm getting here is unparalleled
 
2:47 PM
Off to lunch. Bye Java!
 
Cya Michael
 
Cya @Dustiny
 
 
2 hours later…
4:19 PM
is there any URI encode libarary in java or apache tomcat libaries, that allows you to convert a sentence like "a b" into "a%20b" instead of "a+b" like suggested to use url encode in java does?
 
fge
Bug fixing: roll a d20, add both your Int and Wis modifiers to the dice (negative modifiers apply); see "Table: bug type" for the DC of the relevant bug. On a roll of a natural 1, you fail to pinpoint the cause of the bug correctly and misinterpret it: roll a d% and see "Table: bug misinterpretation" for the effect. Retry: if you fail to pinpoint the cause and do not roll a natural 1 (see above) you may try again after 30 minutes (no penalty to the DC) or immediately (+5 DC)
Meh
I kind of foresee a D&D 3.5 programming tabletop game :p
 
/javadoc URLEncoder#encode(String, String)
 
@Vogel612 String encode(String s, String enc): Translates a string into application/x-www-form-urlencoded format using a specific encoding scheme. This method uses the supplied encoding scheme to obtain the bytes for unsafe characters. (1/2)
 
@jgr208 ^^
 
fge
@Vogel612 no, that won't do
*sighù
That is a very common mistake
As the javadoc says, this method is meant to encode data for application/x-www-form-urlencoded
This is NOT meant to encode URIs
 
4:23 PM
@fge yup why i didnt use it.
 
fge
@jgr208 if you use Guava you may want to use UrlEscapers
/javadoc UrlEscapers
 
@fge com.google.common.net.UrlEscapers: Escaper instances suitable for strings to be included in particular sections of URLs. (1/2)
 
fge
(in fact, in spite of the name, these classes apply to any URI -- see RFC 3986 for details)
Otherwise, you can use this project of mine
(sorry, URL was bad; URL is github.com/fge/uri-template)
 
sadly we dont use guava or any other 3rd party libaries beside tomcat but i did a search for guava java and found Guava & Java shop at an airport
 
 
1 hour later…
fge
5:53 PM
OK, I have a design problem, and unit testing that design
 
whats the problem?
 
fge
Basically: I parse a language, I produce tokens, and grammars; and I have to wrap those tokens into user defined classes
There are statements in code blocks, some statements embed code blocks; etc
 
Hi
i want to ask a question regarding a music player i am making in eclipse
i am not so experienced in java
anyone tere ?
 
what kind of music player? and a java music player sounds nice in theory for running on all types of computers but idk how it will be in practice
 
audio music player
i want to add sound effets in it like treble mono stereo etc
but not geeting any idea relatted to it
any idea jgr ?
 
6:10 PM
i am not your bro, but find some apis that you can hook into
 
hmm i used bro in friendly .dont mine.........wel i searched a lot not got....:(
 
Have you got a simple thing done where you can load and play audio already?
 
yup
 
6:13 PM
@jgr208 I'm not your Budday, Guy! I'm not your Guy, Budday!
 
its an android project
 
hold up @developer
android =/ java
 
yup
 
i am pretty sure there is an android chatroom here
this is the java chatroom
 
yes
 
6:14 PM
can't tell if trolling or not
 
in android chatroom..i dont have access
due to less repo
 
huh?

 Android Era with Kotlin and Java

Important: Read dos and don'ts here: androidera.github.io . Ma...
 
stackoverflow.com/questions/32969236/… try to answer my question if u guys can :)
 
pretty inactive room bro
only 1 android active room as of now
 
6:17 PM
you just posted in there...
 
yes.......yesterday evening i did
 
1
Q: Web Audio API, setting treble and bass

livi1717I'm trying to learn how to use the web audio api properly and I'm running into a bit of confusion. In my project, I'm trying to replicate the functionality of an old 1982 Harman/Kardon receiver. (click link to see photo) This receiver has separate dials for the treble and bass control. I'll ju...

29
Q: Low-latency audio playback on Android

Sergio MoralesI'm currently attempting to minimize audio latency for a simple application: I have a video on a PC, and I'm transmitting the video's audio through RTP to a mobile client. With a very similar buffering algorithm, I can achieve 90ms of latency on iOS, but a dreadful ±180ms on Android. I'm guessi...

1
Q: How to convert audio from stereo to mono in Android?

Kunal AggarwalI use the android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI intent to load music files from the SD Card. Intent tmpIntent1 = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI); startActivityForResult(tmpIntent1, 0); and in onActivityResult ...

if you can't read those and do what you want, then i am afraid you need someone to work with you on the project @developer
 
hmm lemme see......
 
You'll regret this friend!
I'm not your friend, budday!
I'm not you're buddy, pal!
I'm not you're pal, guy!
I'm not you're guy, budday!
 
@jgr208 i aleady checked SO or android developer site yeserterday
if u read properly no SO ques has answer on it as accepted
 
6:28 PM
just ebcause it accepted doesnt mean its not right @developer
not accepted i meant
 
hmm thse answers r not right even
i mean not relevant to topics
 
1
Q: Web Audio API, setting treble and bass

livi1717I'm trying to learn how to use the web audio api properly and I'm running into a bit of confusion. In my project, I'm trying to replicate the functionality of an old 1982 Harman/Kardon receiver. (click link to see photo) This receiver has separate dials for the treble and bass control. I'll ju...

you mean setting treble like you said you wanted to do doesnt apply to you?
with an accepted answer
yes it may be javascript but if you have an intimate knowldge of programming you should be able to conert the code to the android api but with the same logic
 
hmm not much knowledge though i will try to convert :)
 
also that is a link to a book which i wont tell you to but you can probably find for free some where and help you
 
Thanx :).i will try
 
7:07 PM
http://www.commitstrip.com/en/2015/10/07/when-your-colleagues-are-stuck-on-a-something-simple/
CommitStrip - Blog relating the daily life of web agencies developers
When your colleagues are stuck on a something simple
CommitStrip
1444244577
 
/javadoc Nonnull
 
@Unihedron android.annotation.NonNull: Denotes that a parameter, field or method return value can never be null. (1/2)
 
@OakBot 404
 
@Unihedron Type /help to see all my commands.
 
@Michael FIX YER BOT
 
7:18 PM
anyone watching AHS tonight?
 
AHS?
America has Salent?
 
haha american horror story
 
Oh no, I've heard it's good though.. Worth checking out?
 
hmmmm... that boss was waaay easier with all the detours I took
 
Which boss
 
7:24 PM
Capra Demon
 
googles capra demon Ahhh Dark Souls, yes..
 
Instead of going straight for that machete wielding jackass after the gargoyles I took a detour
made a different boss and another miniboss before
and then I could wear my heavy armor without becoming slow as a snail
 
That was a good game.. ahh smart move
 
now for the depths.
 
I ended up buying Bloodborne, beating it in a week and returning it and getting 50 bucks back lol
Not a bad move on my part I don't think, I knew I wouldn't replay it
Speaking of games, you ever play Divinity: Eternal Sin ?
It's coming to the PS4 in a few weeks, and it looks amazing..
It has really good PC reviews, even won a ton of GOTY awards
 
7:27 PM
@Dustiny nope
 
Dark Souls 1 or 2?
 
Ahh.. too bad. Guess I'll just dive into it then based off it's positive feedback
 
@Kylar 1, the prepare to die edition
also having a +3 bow with the weapon-skill on 23 helped a lot
there's that one place in the room where the boss can't get to.
sometimes an attack reaches, but eh.
 
Haha
Glitching out bosses is a fun past time with those things
Especially particularly impossible-ish ones
 
capra isn't that bad.
the gargoyles are worse in solo
two flying beasts with huge stone axes that breathe fire..
at once
but they drop nice equip. You can cut off one tail for an axe and the other one drops a helmet
 
8:13 PM
@Dustiny sorry yes it is. was helping a new co worker commit with svn the first time
 
@jgr208 I dearly hope that you didn't regress to SVN from reasonable version control like git
 
@Vogel612 nope we did not but that explains why i was gone so long to help someone with their first commit
took about 45 mins or so
 
8:31 PM
@jgr208 Hmm I'll check it out then, I'm assuming by the name that it's scary?
@Vogel612 Still on ol' SVN myself here.. <_<
To be fair though, most of what we have in SVN is just documents
 
haha scary if you are like 10 but more like mysterious and intreging for what will happen in the next episode
 
Ahh okay cool
I'm pretty apathetic to horror things anyways
 
me too, i like good stories better
 
Yeah same here
I'll probably start AHS after checking out the IT crowd
People have been bugging me to watch that show for months now
 
like if its the same old horror oh no lets run into the abonded house all get killed boring. but if its lets go here and oh no my friend is the killer but wait now they got killed so they arent now who is the killing anf you dont know till the final scene thats what i like
never watched IT crowd
 
8:35 PM
grrr... can't even walk next to that boss without recieving shitloads of damage...
 
@jgr208 Yeah I'm more down for the latter kind of horror myself as well. That new movie coming out looks interesting.. I think it's called "The Visit" ? Or something along those lines
The one about the grandparents going nuts
Looks like it'll have a bunch of cliches but also seems kind of refreshing too
Isn't just a normal looking "Demon posession" or "random psycho killer" kind of movie
 

« first day (1810 days earlier)      last day (3117 days later) »