« first day (3615 days earlier)      last day (1332 days later) » 

1:23 AM
farts
 
 
6 hours later…
7:23 AM
reads a book
 
 
6 hours later…
1:23 PM
dreams of electric sheep
 
I experienced some interesting behaviour
adding one line of code lets my heap grow 20gb in size
actually even 26gb ^^
post_trip_activity_state.setOnExitAction(() -> currentLocatedStay.getLocation().updateOccupancy(-1));
so the reference inside the lambda which refers to a variable outside of the lambda scope creates a huge memory leak
 
sounds perfectly fine :D
 
but very interesting one what a single line can do :D
but I kinda feel bossy now :P
@Wietlol passing in the location as parameter to the lambda could fix it?
 
1:45 PM
perhaps
 
like: loc -> lox.updateOccupancy(-1)
 
but it depends on why you have a memory leak
 
maybe due to the fact that currentLocatedStay will never be gc'ed?
because it holds a reference to a location that is throughout the simulation live
but actually my state is not being gc'ed
because I never remove it from the list of all states
I need to get JProfiler up and running ^^
 
 
1 hour later…
3:11 PM
holy moly sometimes I write ridiculously baad code
plans.stream().parallel().forEach(plan -> state_machines.add(TPS_PlanStateMachineFactory.createTPS_PlanStateMachineWithSimpleStates(plan, writer, pm, this))); YIKES!
 
no clue what is happening there
 
well I stream in parallel over a list and add items to another list
a standard arraylist :D
not thread safe
I just added the parallel() yesterday in the very late evening without thinking about the side effects
and now I wonder why my results look so awkward :D
 
3:35 PM
@Wietlol removing the runnable and creating a new Action with location as parameter rtemoved the leak
 
 
1 hour later…
4:49 PM
I have got a serious question. If java applications need a JVM to run and not all of the users have a JVM on their machines, what is the point of making programs with Java? Is there a tool to make a Java app compiled to .exe?
 
5:01 PM
@Omid.N java applications need java which when your application is being launched starts a JVM
 
@Omid.N there are ways of making exe files from java programs, but in essence, it just packs the jvm inside the executable making it bigger
if you've ever used c#, it's like the .NET framework. You need it installed before you can run a program written using the .NET framework
 
so the only thing you need is to download is an OpenJDK which contains everything you need
 
there are jvm installers which will install their version of the jvm on the machine if it isn't already installed, and it works silently
the user might receive only just an admin authorization request to install it and that's it
it's not that invasive
 
on the bright side, there are 3 billion devices that run Java
 
nice one :D
 
5:10 PM
not sure if the message is still there...
I havent installed Java in a while...
soon, I will have to install it, but on a linux machine, over ssh, so probably not really gonna see any gui
 
@Wietlol more devices than there are hamburgers sold from mcdonalds
in fact, whenever I buy a couple hamburgers from mcdonalds, I be sure to buy twice as many java-compatible devices, naturally
 
while Niel is ordering hamburgers, I am making a DAO lib...
I need some food...
also, yes, I am crazy
but now I am at the point of me having to figure out how sql works... the implementation details of it
 
McDao
 
Xin Dao
 
hamburgers are rarely great when ordering
 
5:37 PM
good evening
 
6:00 PM
@Wietlol @Neil Is it not a disadvantage for Java that every Windows has .NET installed automatically but not Java?
And how popular is desktop development with Java?
 
@Omid.N small disadvantage perhaps..
 
compared to C#
 
if that were such an issue, then make an executable.. just told you you could
what can I say? When Microsoft is your backing sponsor, kinda hard to lose when it comes to Windows machines..
 
@Neil while you are here, another Q, what is code golfing?
 
It's inventing challenges and seeing who can find a programming solution usually requiring the least amount of code
but also time or other metrics
 
6:06 PM
I have seen it but the codes in CodeGolf StackExchange are really short and meaningless
@Neil is it worth learning?
 
learning how to code golf?
 
yes
 
depends on the scope... you want to be a good programmer? code golfing has nothing to do with that
 
Just for the record, it is a program: ∧{ḃs₃ᵇ+ᵐ≤ᵛ2&ḃ+≤3&≜}ᶠ²⁵⁶;?∋₎
 
oh I know, it can get crazy
just look into brainfuck language
it's not meant to be readable..
 
6:26 PM
Dear @Neil , are you still there?
 
yes, and don't ping me please to ask if I'm still here
 
sorry! I am going to ask you this question because you are experienced.
what do you recommend me to learn next? algorithms or java libs?
 
algorithms
or perhaps more importantly, learn the basics of programming
doesn't matter if it is in Java or another language. These basics are in every language
it's crucial you learn them well if that's what you want to do for a living
 
like OOP or ...
UX design principles?
 
well you don't really learn OOP, it's a paradigm, not a pattern
but you could learn patterns
they're more useful than algorithms honestly
Are you familiar with the Factory method pattern? Do you know when you would use it and why it's used?
stuff like that
 
6:35 PM
I would recommend to learn software principles
over patterns
 
pretty vague
you might as well recommend that he learn "programming stuff" over patterns
you mean like best practices?
 
let's say the name of books to be more clear
 
honestly, never learned any of this stuff from books
you get it by reading other people's code and understanding why they did it a certain way
 
because i didn't get what you meant by basics
 
I mean, when a programmer talks about a callback, do you know what he's talking about?
Do you think you could implement one?
Why would you use a callback?
you see callbacks in every language to varying degrees
Do you know what iterators do? Why would you use them? Why wouldn't you write your own?
 
6:41 PM
so it is design patterns :). I already know how to implement Singleton hehe ...
 
well that's a good start, though Singletons have downsides
Dependency injection makes singletons obsolete
 
I think GoF once got accused of being scammers . did you know about it?
 
well a lot of those patterns are outdated, but scammers, no.. didn't hear that
 
OK bye for now! thank you for your response
 
6:58 PM
@Neil I mean programming principles
Single Responsibility Principle
Separation of Concerns
Law of Demeter
Liskov Substitution Principle
etc
 
 
2 hours later…
8:54 PM
@Neil yeah brainfuck rocks!
 

« first day (3615 days earlier)      last day (1332 days later) »