« first day (2687 days earlier)      last day (2486 days later) » 
00:00 - 21:0021:00 - 00:00

wim
wim
21:00
@Simon Yes.
cbg
@Kevin OOPs?
3
cbg Byte
21:20
@ByteCommander Cabbage.
PyCharm looks good actually.
sure does
lol
21:37
left one has more emergency burning capability :D
you mean "im in the mood to burn something" capability?
the left one is also more suitable to beat scare unwanted people out...
Have you read them yet? Or do you just keep the large one as a doorstop?
@ByteCommander I feel it calling the web-dev in me... :p
not mine
just stealing reposting
I do have some ancient tech books of similar size though
Like this one ^
@MooingRawr That one should keep you going for days :p
21:53
is it because we have to await for a response to if we can burn it or not ? :D
Sure it's JavaScript. No one here will mind (probably) so just go ahead. Just don't go in the JS room, there will be a warrant for you in there.
22:08
Just logged into Sourceforge for the first time in years. They redesigned the site. Mostly skinning, but looks like there are some new features, too.
Still ad-heavy, though ;-(
What do you do when you can't come up with a good function name that is convenient?
@Code-Apprentice Always was. Probably always will be, and it''s not like they are not annoying.
@SebastianNielsen somefunctionname seems traditional.
I used createwidgets today.
> There are two difficult things in computer science: distributed system, naming things, and off by one errors.
@SebastianNielsen What is it you are doing? Call it a short summary. For example if creating a GUI display or addwidgets are good. For CLI term
That is not what I meant, I am trying to think of a good name for a function that has a certain job. But I can't come up with a good name for it, that seems convenient. Naming the function "somefunctionname" is not that convenient tbh.
22:18
ack! IntelliJ renamed "New Branch" to "Checkout As..."
It is hard to explain what the function does, that's why I cant come up with a good name for it.
now I have to learn to type the new name...
@SebastianNielsen Start there. What in short does it do?
@SebastianNielsen often difficulty naming a function means that it is doing too much and needs to be refactored into multiple smaller functions.
+1
22:20
I'll try my best. It "prepares" a new "network". It will load cookies and run the first ad stuff like that. The function is about 18-20 lines. So it isn't that big.
prepnet?
so prepare_network()
You would properly need a little more background on my project in order to fully understand what I just said.
If it isn't already, load_cookies() should likely be its own function.
and even run_ad().
yeah they are.
They will be run in this funciton
I guess "prepare_network()" isn't that bad of a function name.
22:22
Just as a side note would a class be better for this task?
Not really.
2 hours ago, by Kevin
Science has not yet discovered the technical term for "feeling like OOP is necessary when it might not be"
OK fine. Forget I said anything.
I was actually not asking with the intention of having you help me with naming a function. The purpose was to see if you had any methods when you were stuck with a function, that you have no idea of what to call. E.g. brainstorm some names or tell a rubberduck what the function does in as few words as possible in order to get you thinking.
22:31
I already mentioned what I do. Create a short summery of what it does, one or two words and use that as the name. Ensure it actually describes what it is doing.
@jjj oh, wow
A short break helps me immensely as well.
jjj
jjj
@roganjosh yup
Yeah, a short break from some code you have focused intensly on for a long period of time is always helpful.
@SebastianNielsen You need "keywords". Create these and select one or two that best describes the function.
Join them together and you are good to go.
22:35
Well the question is, how do you come up with some good keywords if your brain is totally blank.
You could run through past code for inspiration.
You could also use function calls that already exist in modules such as findall ect
22:54
Which example looks the best? codeshare.io/axzOED
I like the first one, but the second example is fewer lines of code.
I would go for 1 since you are creating fewer new variables.
But if you need to modify those values a lot later 2 would be advisable
Well performance wise the creation of the variables is not noticeable. I am only going to run this function 5-10 times.
I would go for 1 then.
Okay thanks a lot.
Still I would like a second opinion on this. I would not say my Python is perfect, but I would think we would have heard already if it was a big no no.
As a general rule keep variables to a minimum. Unless it makes you code unreadable.
Here 1 is a good option because it seems a variable will be used once.
PyCharm is amazing :D
23:15
consider a dictionary?
Good thinking.
Good idea kevin, I find it so hard to choose now. codeshare.io/axzOED
It is all pretty much about preference
23:35
Okay, but consider more dictionarying
That looks like invalid syntax even
@simon what?
Uh, wait you are right
In my mind a dictionary looks like this:
I know what a dictionary looks like.
I just forgot to change it.
Ok I was just trying to help.
23:40
I appreciate that, I am not mad if you thought that.
Anyway how does it look now it's "dictionaryfied", is that an improvement to your code?
I still prefere example 2 as it is more readable since the strings are aligned perfectly.
But I like the dictionary approach above example 1
23:55
I will not deny it's a hard choice, but a dictionary might be a better choice, it depends how the rest of your code goes with it.
Well it's just a simply function. By the way this is the full code if you are interested github.com/Sebastian-Nielsen/kingdomlikes-bot/blob/master/…
Exam room cbg / rbrb
Exam room what?
00:00 - 21:0021:00 - 00:00

« first day (2687 days earlier)      last day (2486 days later) »