« first day (2403 days earlier)   

12:53 AM
morn
 
 
3 hours later…
4:00 AM
"There is no one right way. Just figure out what works for you!" -Lorii Myers (source)
 
 
2 hours later…
5:44 AM
15 messages moved to bin
@Michael stfu
 
@Michael lol
@geisterfurz007 geissssssssssss
 
6:13 AM
anyway to declar in an abstract method that every subclass needs to implement a main entry point, it seems like it doesn't like the static modifier
 
6:41 AM
/train
 
"🚂🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃�‌​‌​‌​�‌​🚃🚃🚃🚃🚃🚃🚃🚃"
 
 
1 hour later…
7:54 AM
/fatcat
 
8:49 AM
Morning
 
9:09 AM
morning
 
morn
 
it was an amazing day yesterday
 
good to hear
 
I met two chinese girls in our country
they were looking for some places
I suggested to them to came with me and show them the best places
we talked so much and we enjoyed the day lol
 
:o
nice
 
9:13 AM
they are funny
they discuss me the rules of china
and I can remembre the important rule which is :
in china you re not allowed to bring more than one kid lol
 
wrong, you can if you pay.
 
yeah i heard that before
 
Ah okay
also it's expensive there
the most of them are tenant
its difficult to buy a house there
even if you buy one it will be illimited
 
it's difficult to buy a house anywhere outside the US.
 
in our country if you own a house it will be forever for you
yes
I missed them so much
we will have dinner tomorrow
They invited me
I am thinking to ask one of them for a marriage
but you know they don't know their starts like Bruce lee, jakie chan ,etc
 
9:19 AM
Average London Terraced House price is ~$770,000
Impossible to buy, unless you're rich
@Sayros That's good!
Good Luck!
 
thanks
 
@CrashBandicoot so basically, not impossible
 
Yeah
It'd take Years to pay off the mortgage, if you have a substantial deposit in the first place
I think the average is 3-4 bedrooms
Write a while loop that prints out pairs of numbers that show the current value of n and the value of n + 10 as long as n is less than 10.
I've initialised n = 0
while (n < 10){
But I don't understand what is meant by "pairs of numbers that show current vale of n"
 
9:35 AM
there's your problem
learn english
 
xD
I can understand what it says
 
morning
@CrashBandicoot check prices for terraced houses in luxembourg city :)
has someone by chance worked with an Eddystone beacon?
 
bacon!
 
@Tavo :D
 
I once went to devslovebacon and they had bacon sarnies for lunch. It was memorable
 
9:46 AM
hey
 
ho
 
whatsup tavo
 
gosh, nobody knows the Ramones?
 
you
 
and the three members that are still alive, provided they don't have any memory issues
 
9:52 AM
@motaa But that's for 5+ bedrooms
 
@motaa lux not for living it's just for work like dubai
too expensive there
 
With my Java question
 
@Tavo who is that?
 
So, I have to print out 2 numbers showing value of n
and the value of n + 10
Using a while loop
 
@ColdFire a punk band
 
9:55 AM
and yet you're wasting your time chatting in a chat room
 
@Unihedron aren't we all?
 
10:10 AM
I'm not quite sure what debugging does it Java
Does it just take you through the steps in your program?
 
10:44 AM
Where exactly do you put the break points in a debug?
 
@Tavo oh
 
11:09 AM
discovering Ansible these days
:p4
 
11:48 AM
@Sayros thats why I moved to germany :D
 
Hi Java!
 
@CrashBandicoot at points where you think your code breaks
 
/crashbandicoot
 
Makes Sense!
 
Hi @ItachiUchiha ! I'm finally back :D
 
11:51 AM
eyyy @Julo0sS
How's it going?
I'm asked to Write a loop which goes from 1 to 7 and prints out “today” if it’s a week day (1 – 5) or “weekend” if it’s a Saturday or Sunday (6,7)
I've used a "for" loop, which seems to be wrong
 
can you paste your code on hastebin?
 
@CrashBandicoot hey, fine thx, whatabout you? still discovering the dark side of java?
 
@Julo0sS I'm okay I guess. Still discovering, yeah... xD
 
@motaa Hatebin !
 
11:55 AM
@CrashBandicoot what error are you getting? :D
 
It works, but I don't think it meets what is expected
 
because it doesn't :D
the problem with your solution:
you just print out 5 times today and after that twice weekend
 
Based on the question
Would you say that the output meets the question?
 
no
because you are asked to determine on a parameter whether it is a weekday or weekendday
 
I see
So basically, there should only be 1 output
 
11:58 AM
and 1 input
and that input comes from the loop
 
makes sense
So, essentially, I just need to initialise the variable before the loop
and the loop will determine whether it is a weekday or weekend
 
your method should take and int parameter (in your case "abc")
you know how loops work right? :D
inside your loop you should use a method that you implement that takes the "counter" of the loop as input parameter
 
Yeah i do
 
I will give you a hastebin hint soon :) my ranked jsut started :D
 
just if %6 or %7 (==0) then it's a weekend day
your "day/weekend" thing sounds strange, why do you need "for" loop?
 
12:05 PM
Can anyone point me in the direction of a good IDE / set up for working on Java projects across multiple computers? I'm fairly n00bish but would like to work on my PC, pick it up on my laptop, continue on the pc etc.

I know IntelliJ is a favourite around here, but is it good for working on multiple computers? I can't figure out how to do that.

I use google drive a lot for other work but if I needed some kind of USB flash drive to keep the folder syced, it would be okay.

Thanks
 
any IDE will fit, you just have to decide how/where you keep your files...^^
 
@Julo0sS It says "use a loop"
Not sure which one to use...
 
12:30 PM
I would've used a switch statement, but they want a loop
 
@CrashBandicoot you want the solution? :D
@CrashBandicoot check this out https://paste.ofcode.org/BRZLcs5tuRgvCf2psgzHvD
it is NOT a solution
just a hint :D
 
12:57 PM
@CrashBandicoot paste.ofcode.org/9kP8dvHWfMP3hfVkf7my7X the solution with comments on how I would solve it
forgot a 'm' at line 11
 
1:12 PM
@motaa Thanks so much for the effort!
I understand it
 
Morning, Java!
 
hi
 
hi Michael
 
Where did isWeekend come from on line 7?
@motaa
 
Hey @motaa @Julo
 
1:16 PM
@CrashBandicoot it is a method in your class at line 17
 
Oh yeah xD
Sorry
For this: write a while loop that prints out pairs of numbers that show n and 2^n as long as n is less than 10.
How do I get a value for 2^n?
 
@CrashBandicoot note that if your loop goes beyond 7 it will always put out "today"
 
without using the Math.pow function
@motaa Cool :)
 
as a loop
 
I've done this:
But obviously, line 10 is incorrect
 
1:21 PM
where does it get n?
do you have to input it?
 
Yeah
It has to start from 0
 
and count up?
 
is it possible to put conditional statements on a where clause? LOL. sorry i know i intended to ask on the wrong room
 
and that 10 times?
 
1:23 PM
well yeah
 
or is that optional on what number you put it in as n?
 
It has to be 0
 
@FasevMoweasck where clausE? :D
 
SQL xD
 
1:24 PM
ah true :D
 
SQL yes
 
I'd think so yes
 
I am pretty sure that it's possible
 
@motaa I just need to know a way of getting a previous value of "n" and outputting 2^n
 
@CrashBandicoot I want to know how do you pass 'n' into your programm? Is that some input a user has to type in on the console or you just put it into your class
 
1:26 PM
I initialised it in the class
int n = 0
 
so you set the value directly in your class then? :)
 
ok lets go through this then
so what kind of loop would you use?
 
for loop
 
because you know beforehand that you iterate exaclty 10 times and always start from 0
 
1:33 PM
yes
 
in your case I would actually fo with a while loop but it also works with a for loop
as you have written in your code, you print sth out in every iteration
 
hmm ok
sth?
 
something
also we now need a way of calculation the powers without using math.pow
for that I would either use a recursive method or just a simple loop
 
Okay
How would I do that?
 
@CrashBandicoot gimme a sec I am currently writing it :D
 
1:42 PM
Okay cool
Appreciate you helping me :)
 
I can't use a "power" method
 
one thing this is not easy to read so I will rewrite it in a better to understand form
you are not using a power method
you are using you own method to calculate powers
 
Oh yeah, sorry
The original questions gives a hint:
just base it on the previous value and multiply it by 2
 
and that is what my recursive method does
but I am currently reformulating it in a second version using just a loop
 
1:47 PM
Okay cool
Thanks!
 
did you finish all codingbat tasks yet?
:P
 
@Hans1984 It was very difficult for me
I decided to step down a little
 
it is very difficult
 
@CrashBandicoot check this out paste.ofcode.org/bPpqctJtMucbHZULFqY6L3
 
more so for a beginer
 
1:57 PM
@motaa Do I use both of those recursive methods?
 
no
 
The thing is, it was meant to be a short exercise
Just to test myself on conditionals xD
 
I just mentioned several methods to show you that there are other ways
and that the first recursive method is written in a style which is not that clear for beginners at first :)
binPower and binPowerLarge are exactly the same
 
@motaa Thanks so much for the help!!
 
just written differently
nowadays people seem to love one liners
 
2:03 PM
Yeah!
On line 7
I don't quite understand why (i) is used
 
well the method isweekend()
expects an int value
which is i
@CrashBandicoot
 
@CrashBandicoot How would you implement it without the i?
 
suppose your weekdays are numbered from 1-7 monday = 1 sunday = 7
 
@Hans1984 Oh right
So, it's just taking the value of i, which the isWeekend() method requires
 
exactly
 
2:10 PM
as I said any value except 6 and 7 will return false
 
and runs the loop
Makes sense!
Thanks a lot guys!
 
@CrashBandicoot Read the code
 
the loop runs outside :)
 
See where i is used and what's being done with it
The ability to read code and "run" the program in your mind to predict what the program will do is an important skill that you should practice.
It's a skill most developers take for granted
 
@MadaraUchiha and that you will master over time by practicing :D
besides the isWeekend method needs to be static
 
2:12 PM
Yes, that's true.
(both)
 
@MadaraUchiha Thanks for the advice!
@motaa How would you debug that code you sent?: paste.ofcode.org/bptzP3UBtUesYU72wHXuCU
I'm presuming you put breakpoints on lines 9 and 18?
and then run the debug?
 
2:31 PM
it depends
usually I would put in unit tests for this
in which case I only start debugging when an actual error occurs :)
btw in your exercise about weekends
you could have solved it aswell using a switch case
 
Yeah I could have
But they specified that I should use a loop
I'm asked to practice with the debugger with each exercise
 
of course you keep using the loop
 
oh right
I understand
 
you would use the switch case inside your is weekend method
 
oh well, as long as it works :)
@motaa thanks!
 
2:41 PM
but to be honest a switch case would be a little overkill for that task :D
 
I've tried reading though using a debugger, but it doesn't make sense
I don't know where to put the breakpoints and how to debug... xD
 
what ide are you using?
think about debugging this way
first of all you need to get a grab at what is going wrong... for example you expect somewhere in your program a certain result
but somehow it does not work
I try to give you a simple example soon... my ranked just started ^^
 
Eclipse
It says "See if you can get it to show you the specific values at each step of execution"
 

« first day (2403 days earlier)