Log for #openttd on 3rd July 2015:
Times are UTC Toggle Colours
00:36:09  *** JezK [~jez@2407:7800:400:107f:3db5:daca:8457:e66a] has joined #openttd
01:24:52  *** liq3 [] has quit []
01:52:38  *** supermop [] has joined #openttd
01:53:54  *** fjb_mobile [] has quit [Ping timeout: 480 seconds]
02:28:03  *** Biolunar_ [] has joined #openttd
02:35:05  *** Biolunar [] has quit [Ping timeout: 480 seconds]
03:16:41  *** liq3 [] has joined #openttd
03:22:45  *** glx [] has quit [Quit: Bye]
04:56:01  *** Eddi|zuHause [] has quit []
04:56:16  *** Eddi|zuHause [] has joined #openttd
05:18:39  *** Pikka [] has joined #openttd
05:26:04  *** roidal [] has joined #openttd
05:30:49  *** KenjiE20 [] has quit [Ping timeout: 480 seconds]
05:39:51  *** KenjiE20 [] has joined #openttd
06:37:42  *** Flygon_ [] has joined #openttd
06:43:37  *** zeknurn [] has quit [Read error: Connection reset by peer]
06:44:38  *** zeknurn [] has joined #openttd
06:44:53  *** Flygon [] has quit [Ping timeout: 480 seconds]
06:50:00  *** Flygon__ [] has joined #openttd
06:53:18  *** DDR [] has quit [Ping timeout: 480 seconds]
06:56:25  *** Flygon_ [] has quit [Ping timeout: 480 seconds]
07:19:48  *** Celestar [] has joined #openttd
07:42:44  *** Supercheese [] has quit [Quit: Valete omnes]
07:44:25  *** JacobD88 [] has joined #openttd
07:51:17  *** roidal_ [] has joined #openttd
07:58:08  *** roidal [] has quit [Ping timeout: 480 seconds]
08:20:50  <planetmaker> moin
08:22:16  *** Supercheese [] has joined #openttd
08:26:36  *** JezK [~jez@2407:7800:400:107f:3db5:daca:8457:e66a] has quit [Quit: :q!]
08:38:26  *** wicope [] has joined #openttd
08:57:42  *** Flygon__ [] has quit [Read error: Connection reset by peer]
08:57:56  *** Flygon__ [] has joined #openttd
08:58:09  *** Pikka [] has quit [Read error: Connection reset by peer]
08:58:34  *** Pikka [] has joined #openttd
09:01:12  *** Hiddenfunstuff [] has joined #openttd
09:01:19  *** Pokka [] has joined #openttd
09:01:32  *** JacobD88 [] has quit [Quit: JacobD88]
09:02:45  *** Pokka [] has quit [Read error: Connection reset by peer]
09:03:05  *** JacobD88 [] has joined #openttd
09:04:46  *** Pokka [] has joined #openttd
09:07:26  *** Pikka [] has quit [Ping timeout: 480 seconds]
09:14:58  *** Guest3518 [] has quit [Ping timeout: 480 seconds]
09:18:13  *** urdh [] has joined #openttd
09:18:47  *** urdh is now known as Guest3824
09:45:50  *** fjb_mobile [] has joined #openttd
09:45:56  <fjb_mobile> Moin.
10:04:35  *** Pukka [] has joined #openttd
10:10:55  *** Pokka [] has quit [Ping timeout: 480 seconds]
10:12:16  *** Flygon__ [] has quit [Read error: Connection reset by peer]
10:12:49  *** Flygon__ [] has joined #openttd
10:14:59  *** SkeedR [] has joined #openttd
10:15:37  *** SkeedR is now known as Guest3839
11:05:01  *** JacobD88 [] has quit [Quit: JacobD88]
11:13:29  *** sla_ro|master [slamaster@] has joined #openttd
11:31:18  *** Supercheese [] has quit [Read error: Connection reset by peer]
11:31:39  *** fjb_mobile is now known as Guest3842
11:31:40  *** fjb_mobile [~frank@] has joined #openttd
11:31:53  *** Supercheese [] has joined #openttd
11:33:03  *** fjb_mobile [~frank@] has quit []
11:33:10  *** fjb_mobile [] has joined #openttd
11:33:40  *** Guest3842 [] has quit [Read error: Connection reset by peer]
11:50:27  *** Pukka [] has quit [Read error: Connection reset by peer]
11:54:34  *** jottyfan [] has joined #openttd
11:59:20  *** yorick [] has quit [Read error: Connection reset by peer]
12:04:03  *** yorick [] has joined #openttd
12:05:20  *** meaneye [~meaneye@] has joined #openttd
12:05:42  <meaneye> Hey folks. I am having this issue on Linux where cursor is hidden while am moving it.
12:06:27  <meaneye> Anyone knows if there is a way to make OpenTTD fullscreen only on one display?
12:13:33  *** andythenorth [~Andy@] has joined #openttd
12:13:38  <andythenorth> I have worked it out
12:13:47  <andythenorth> Baldy’s Boss is a relatively advanced lingua bot
12:13:54  <andythenorth> with a very specific focus
12:13:55  <planetmaker> that depends really on your setup, meaneye... on how you configured your system to use the two monitors
12:14:04  <planetmaker> o/ andy
12:14:16  <planetmaker> write a counter-bot :)
12:14:37  <planetmaker> meaneye, e.g. on my system 'full screen' only covers one monitor
12:15:32  <planetmaker> thus it's more a config issue with your graphics card (driver) on how full screen is handled
12:15:46  *** andythenorth [~Andy@] has quit [Quit: andythenorth]
12:16:24  <planetmaker> I can't look-up my config right now... fedora20 default setup, tho
12:18:23  *** meaneye [~meaneye@] has quit [Remote host closed the connection]
12:40:57  *** jottyfan [] has quit [Quit: Konversation terminated!]
13:14:57  *** Guest3839 [] has quit [Remote host closed the connection]
13:24:27  *** shirish [~quassel@] has joined #openttd
13:32:15  *** andythenorth [~Andy@] has joined #openttd
13:40:40  *** liq3 [] has quit []
13:44:53  *** Biolunar_ [] has quit [Quit: Yo.]
13:46:24  <argoneus> boo
13:46:28  <argoneus> do you guys use design patterns?
13:46:33  <argoneus> or do you just write whatever makes sense
13:47:07  <V453000> design patterns?
13:47:22  * planetmaker sometimes designes patterns :P
13:47:42  *** frosch123 [] has joined #openttd
13:48:18  <V453000> yo frog
13:49:17  <frosch123> lo
13:55:00  <V453000> how are you doing?
13:56:13  <frosch123> taking a short break before fighting the massive photon attack again
13:56:21  *** Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has joined #openttd
13:56:24  *** mode/#openttd [+o Alberth] by ChanServ
13:56:27  <V453000> yarr
13:56:40  <V453000> I am taking a massive break instead :P
13:56:43  <Alberth> hi hi
13:57:09  <Alberth> yeah, me too, work doesn't cooperate today
13:57:26  <andythenorth> wot?
13:57:37  <Alberth> need a cunning plan
13:57:37  * andythenorth is disgusted by European productivity
13:57:41  <andythenorth> I am here working hard
13:57:57  <Alberth> no worries, I will too, I am sure
13:59:05  <SpComb> we're more productive because we're less productive
13:59:21  * andythenorth might produce ice cream
13:59:30  <Alberth> good idea
13:59:37  <andythenorth> what do we think about trams?
14:00:15  <frosch123> night
14:00:18  *** frosch123 [] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
14:00:34  <andythenorth> frosch hates trams :(
14:01:41  <Alberth> he's having a summer sleep, which is not such a bad idea
14:08:47  <Eddi|zuHause> <argoneus> do you guys use design patterns? <- you don't "use" design patterns. patterns are things that just show up, because they are the logical consequence of some stuff
14:09:03  <argoneus> Eddi|zuHause: yeah but you should be able to recognize common solutions to common problems
14:09:08  <argoneus> which I'm not
14:09:28  *** DDR [] has joined #openttd
14:09:30  <argoneus> like I wanted to write a simple IRC bot, but all code ended up being in 1 class and I don't know how to split it up properly
14:09:32  <Eddi|zuHause> you get better at spotting patterns by spotting more patterns
14:09:46  <argoneus> and I don't know how to find out how to split it properly
14:09:55  <argoneus> it seems that everything relies on everything else
14:10:10  <Eddi|zuHause> that does sound like an antipattern :p
14:10:19  <argoneus> yeah
14:10:25  <argoneus> when I look at sources of existing irc bots
14:10:36  <argoneus> they have classes for everything, commandhandlers, eventhandlers, connectionfactories, etc.
14:10:49  <Alberth> java-stuff
14:10:49  <argoneus> it's maybe needlessly overengineered but it's flexible and the responsibilities are clearly split
14:10:56  <argoneus> but I don't know how to get on that level
14:11:07  <Alberth> why would you want to?
14:11:08  <Eddi|zuHause> by taking one (refactoring) step at a time
14:11:27  <argoneus> Alberth: it lets you add new things without killing yourself
14:11:34  <argoneus> and change existing things
14:11:39  <Alberth> false
14:11:46  <argoneus> if designed correctly that is
14:11:56  <Alberth> you cannot prepare for all possible extensions
14:11:57  <argoneus> it's better than a super powerful 1 class
14:12:24  <Alberth> so no matter what overengineered thing you have, there are always points that you cannot extend easily
14:12:41  <argoneus> yeah but
14:12:46  <argoneus> how do I learn how to engineer things :(
14:12:55  <Eddi|zuHause> argoneus: the point is: you cannot ever "design" from the first go. you may have a rough structure in mind from when you started, but with every expansion, that structure gets more and more whithered down
14:13:00  <argoneus> experimenting doesn't seem to help, even if I recognize shitcode, I don't know what to do about it
14:13:02  <Alberth> extend it in some way
14:13:09  <Eddi|zuHause> argoneus: the trick is to review the structure and refactor as you go along
14:13:15  <argoneus> and reading books with generic diagrams isn't helping either
14:13:34  <argoneus> Eddi|zuHause: so I write that one superclass and then figure out how to split it?
14:13:39  <argoneus> instead of starting out with 10 different classes
14:13:52  <Alberth> yes
14:14:07  <argoneus> so the idea is to first prototype something that works
14:14:12  <argoneus> and then make it not only work but also be manageable
14:14:26  <Alberth> since in the general case, your extension is not going to fit in what you have
14:14:34  <Eddi|zuHause> argoneus: of course, the earlier you notice that you are going to have to split, the easier it is to do
14:14:36  <Alberth> so you need to rework the code
14:14:43  <argoneus> I still don't know what refactoring really is though
14:14:48  <argoneus> for me it's just renaming variables
14:14:52  <argoneus> I never used anything else
14:15:05  <Alberth> any form of changing the code without functional changes
14:15:13  <argoneus> oh
14:15:17  <argoneus> so it's not a specific process
14:15:21  <Eddi|zuHause> argoneus: "refactoring" is turning a*c+b*c into (a+b)*c
14:15:32  <argoneus> like
14:15:35  <argoneus> there are no steps to refactoring
14:15:39  <argoneus> I just look at my code and make it not shit
14:15:40  <argoneus> ?
14:15:55  <Eddi|zuHause> you try to express the same functionality with less shit code
14:16:24  <Alberth> there are steps, in the official book:  1) make tests  2) run tests to verify correctness 3) make change (small steps is better)  4) run tests again
14:16:44  *** supermop [] has quit [Ping timeout: 480 seconds]
14:16:54  <argoneus> oh, right
14:16:56  <Alberth> ie tests are used to ensure you don't miss edge cases
14:16:58  <argoneus> this magical thing called unit tests
14:17:01  <argoneus> that I never figured out how to use either
14:17:06  <argoneus> ;_;
14:17:16  <Alberth> most test-ideas are also over-engineered, imho
14:17:28  <Eddi|zuHause> argoneus: as for how to split "one superclass", the first step may be to DUPLICATE the superclass
14:17:33  <peter1138> Unit test your unit tests.
14:17:51  <Eddi|zuHause> argoneus: then you can chop away at the second class to make it less super
14:17:52  <Alberth> we have arrived at the point where it becomes useful to skip some tests
14:19:00  <argoneus> I don't even know what tests are really supposed to test
14:19:03  <Eddi|zuHause> argoneus: and once that was successful, chop away at the first class by the functions that are now done by the second class
14:19:15  <argoneus> like I have a class that does something weird
14:19:28  <argoneus> and then I write a use case that tries to do something weird using the class, and I make sure the results are what I want
14:19:31  <argoneus> but.... why
14:19:47  <Alberth> test are intended to check the outcome of a function is according to the requirement
14:20:07  <argoneus> for example in the specific case of an irc bot/client
14:20:18  <argoneus> I have a class that connects to freenode and sends NICK, USER, etc
14:20:24  <argoneus> how the hell am I supposed to test something like that
14:20:25  <Alberth> tomorrow you change the code, run the test, and have verification you didn't mess up
14:21:01  <Alberth> yeah, that's where testing becomes more pain than use, imho :)
14:21:17  <Alberth> but opinions differ on that, greatly :)
14:21:38  <Alberth> you can connect to a dummy node, for example
14:22:03  <Alberth> or take out the network part, and just check you do  "send" call with the right values
14:22:34  <Eddi|zuHause> simulate a receiving end, and compare the received string with a sample
14:22:35  <argoneus> that seems kinda meaningless though :(
14:22:45  <argoneus> or not meaningless
14:22:52  <argoneus> but that takes longer to write than the connection part
14:23:00  <argoneus> and probably won't break out of nowhere
14:23:26  <Alberth> depending on how religious you are about tests, opinions vary :p
14:24:36  <argoneus> I just don't know
14:24:42  <argoneus> I never saw myself thinking
14:24:57  <argoneus> "It wuld be great if I had an NetworkSocketConnectionFactory in here"
14:25:47  <Alberth> well, you do have one, it's just not named that way
14:26:26  *** JacobD88 [] has joined #openttd
14:26:49  <Eddi|zuHause> argoneus: most of the patterns are trivial and obvious
14:26:52  <Alberth> but if you have one, you can replace it with a different implementation, eg for testing, or connecting to a different network
14:27:20  <Alberth> patterns are also a religion :)
14:27:34  <Eddi|zuHause> argoneus: that is because no theoretical computer scientist ever sat down and said "hm, let me design some pattern". instead people reviewed real world code and checked out how people commonly solve problems
14:28:09  <Alberth> patterns are only useful to talk about how you solved something
14:28:34  <Alberth> you don't sit down and make a design as a set of patterns
14:29:14  <Eddi|zuHause> most of the time you use a pattern without realizing that it is a pattern
14:30:22  <argoneus> hmm
14:30:33  <argoneus> that makes senes
14:30:35  <argoneus> sense*
14:32:59  *** fjb_mobile [] has quit [Ping timeout: 480 seconds]
14:34:27  *** JacobD88 [] has quit [Quit: JacobD88]
14:47:28  <andythenorth> no
14:47:32  <andythenorth> you are doing patterns wrong
14:47:42  *** tokai [] has quit [Remote host closed the connection]
14:47:45  <andythenorth> the correct way is to make a bingo card of patterns
14:47:54  <andythenorth> and then make sure you use at least one of each in your design
14:48:06  <argoneus> if I get a bingo do I get a certificate
14:48:24  <andythenorth> yes
14:48:31  <andythenorth> certified devloloper
14:48:46  <andythenorth> also you can call it enterprise architecture
14:48:51  *** tokai [] has joined #openttd
14:48:54  *** mode/#openttd [+v tokai] by ChanServ
14:49:06  <andythenorth> w.r.t tests
14:49:10  * andythenorth not trolling now
14:49:27  *** fjb_mobile [] has joined #openttd
14:49:38  <andythenorth> integration tests get you the most return on time spent
14:49:53  <argoneus> w.r.t tests?
14:50:00  <andythenorth> "with respect to”
14:50:13  <Terkhen> hello
14:50:14  <andythenorth> integration tests are automating testing of the app that you (or someone) would otherwise spend time doing manually
14:50:16  <andythenorth> lo Terkhen
14:52:07  *** tokai [] has quit [Remote host closed the connection]
14:53:00  *** tokai [] has joined #openttd
14:53:03  *** mode/#openttd [+v tokai] by ChanServ
14:53:16  <andythenorth> what kind of app is it?
14:54:11  <argoneus> asking me?
14:54:31  <andythenorth> yes
14:54:37  <argoneus> an IRC bot
14:54:42  <andythenorth> how is it controlled?
14:55:00  <argoneus> basically I'm not sure how to split responsibilities into classes (so I have 1 superclass) and I don't know how to test it
14:55:03  <argoneus> controlled?
14:55:05  <argoneus> with commands I Guess
14:55:10  <andythenorth> what’s the user interface
14:55:11  <andythenorth> shell?
14:55:27  <argoneus> it's a bot not a client
14:55:32  <argoneus> it only reacts to in channel commands
14:55:42  <argoneus> like !stuff
14:55:45  <Alberth> you don't start the program, it has no options, settings, etc
14:56:03  <argoneus> :S
14:56:15  <argoneus> there's a config file
14:56:17  <Alberth> that's also user interface
14:56:37  <argoneus> right now I have
14:56:49  <argoneus> IRCBot, BotConfig, and IRCConnection
14:56:58  <argoneus> IRCBot loads BotConfig and starts IRCConnection
14:57:03  <argoneus> and IRCConnection kinda... does everything
14:57:07  <argoneus> including parsing commands etc
14:57:11  <argoneus> because I don't know how to split it
14:57:18  <argoneus> without making it into a larger mess than before
14:57:40  <Alberth> read a line, parse into stuff you recognize, decide how to react, write output
14:58:30  <argoneus> like, I wanted to write something like an onMessage event, that lets people listen to it and react
14:58:33  <argoneus> but I didn't figure out how
15:00:01  *** Geth [] has joined #openttd
15:00:56  <Alberth> what did you try?
15:01:06  <argoneus> well
15:01:33  <argoneus> I wanted to make some sort of MessageParser, but when I tried to split the message from my while recv loop and send it to the parser, it became a mess
15:02:05  <Alberth> sounds like a refactoring puzzle :)
15:02:09  <argoneus> because suddenly I had to pass an instance of MessageParser to IRCConnection, but the connection itself shouldn't care about parsing messages
15:02:33  <argoneus> and then I probably want to make the messages observable and have pluggable observers, but I didn't figure out how to make that either
15:02:41  <argoneus> so now I have a bot that works but whenever I want to add something it's a pain
15:02:41  *** tokai [] has quit [Quit: c('~' )o]
15:03:05  <Alberth> did you try starting from the other end?
15:03:23  <argoneus> you mean writing use cases and then implementing them?
15:03:46  <Alberth> make a sort-of scheme how things should hook up with a new version?
15:03:55  <Alberth> nah, use cases are too low level
15:04:02  <argoneus> so like a UML diagram?
15:04:23  <Alberth> just rectangles and lines on a piece of paper
15:04:30  <argoneus> I didn't try that :<
15:04:39  <argoneus> but that's mostly because
15:04:43  <Alberth> with little blocks of functionality
15:04:46  <argoneus> I didn't know what I would want before I started writing the rough prototype
15:04:54  <Alberth> yes
15:04:56  <andythenorth> I am not a programmer
15:05:00  <argoneus> I was just like okay I'll write the basic connection code now and worry about other things later
15:05:08  <argoneus> but then I ended up with the connection code being the whole bot
15:05:10  <Alberth> that's why you write a prototype
15:05:15  *** Hiddenfunstuff [] has quit [Ping timeout: 480 seconds]
15:05:24  <andythenorth> but I always work out the top-level (primary, first class) and secondary entities
15:05:34  <andythenorth> and they tend to form classes
15:05:42  <argoneus> Alberth: so to speak frankly
15:05:48  <argoneus> I'm supposed to break my nose first and then write it again but better?
15:05:50  <Alberth> so it has served its function, 'throw' it away
15:05:52  <argoneus> and scheme it out
15:06:01  <andythenorth> Write One To Throw Away
15:06:09  * andythenorth would suggest the C2 wiki, but that’s your afternoon gone
15:06:13  <Alberth> you cannot design what you don't understand what you want
15:06:33  <argoneus> so basically what Eddi|zuHause said
15:06:37  <argoneus> now I have a working superclass
15:06:45  <argoneus> and now I want to refactor it and figure out how to split stuff?
15:06:56  <andythenorth>
15:07:03  <Alberth> that still assumes you know where you should go
15:07:18  <Alberth> refactoring in itself gives you no direction
15:07:38  <Alberth> it's just a process to do it nicely without ending up with a 1000 pieces
15:08:02  <Alberth> you need to decide where you want to end up first
15:08:21  <argoneus> so drawing diagrams is a good idea?
15:08:26  <Alberth> and then there are several options to go there
15:08:36  <andythenorth> if your mind responds to diagrams, diagrams are a good idea
15:08:51  <Alberth> whatever works for you, different people have different ways of structuring their thoughts
15:08:54  <andythenorth> some people seem to be able to fully-form architectures in their heads
15:08:58  <andythenorth> some people like bullet points
15:09:08  <argoneus> but basically
15:09:12  <argoneus> I should put my thoughts on paper
15:09:13  * andythenorth draws boxes for entities, then hangs properties off them with lines
15:09:14  <argoneus> or something
15:09:32  <andythenorth> I don’t write things like irc bots very often, but it strikes me as a pipeline
15:09:35  <Alberth> you need to get a clear idea of the structure of the thing you want to make
15:09:37  <andythenorth> pipelines tend to have a flow
15:09:43  <andythenorth> and processing modules
15:09:49  <andythenorth> pixa is pipelined :P
15:09:51  <Eddi|zuHause> argoneus: writing stuff down is certainly something that could help you
15:09:53  <Alberth> it doesn't need to be on paper, unless that works for you
15:10:12  <Eddi|zuHause> argoneus: either write down the state you have currently, or better the state that you want to have in the future
15:10:26  <Eddi|zuHause> argoneus: and then figure out steps how to get to that state
15:10:34  <argoneus> so I just imagine the life of my program
15:10:34  <andythenorth> pipelines often have a parse component to handle initial input, then n processing components, then some kind of final output component
15:10:47  <argoneus> which is connect, get messages, parse them, respond to them, disconnect
15:10:54  <argoneus> and then I try to somehow scheme out how my program will do those
15:10:59  <argoneus> and try to do it properly
15:11:00  <argoneus> ?
15:11:01  <andythenorth> ok so you have a messages entitity
15:11:03  <Alberth> public final OutputComponent = new OutputComponent();
15:11:08  <Eddi|zuHause> that sounds like a plan
15:11:34  <andythenorth> and you might have a response entity, or response is just a type of transformed message
15:11:38  <andythenorth> you have to decide :)
15:12:02  <Eddi|zuHause> argoneus: opposite to OO fundamentalists, not all of these steps need to be in classes
15:12:27  <argoneus> well
15:12:34  <argoneus> the point of OO is to throw away performance but get flexibility, no?
15:12:48  <argoneus> who am I kidding, the point is to be able to get a customer on your side to buy your shit
15:12:51  <argoneus> ;_;
15:12:51  <Eddi|zuHause> no
15:13:04  <Alberth> yes, but taking it beyond the sweet point it works against you
15:13:24  <Alberth> as with every technology
15:13:39  <argoneus> I envy funcprog people
15:13:39  <andythenorth> the point of OO is to sell books
15:13:45  <argoneus> they just tell it "make an irc bot" and it works
15:13:46  <andythenorth> the point of funcprog is to sell books
15:14:01  <Alberth> argoneus: believe me, funcprog is not ideal too :)
15:15:01  * andythenorth misses BBC Basic
15:15:15  <andythenorth> 10 print “hello andy”
15:15:18  <andythenorth> 20 goto 10
15:15:34  <andythenorth> we used 10 and 20 because you would inevitably need to add 11, 12, 15 and 18
15:15:48  * andythenorth has just realised how this distorts my entire approach to programming :O
15:16:50  <argoneus> but when you wanted to make 11
15:16:53  <Alberth> dijkstra wasn't that wrong :p
15:16:59  <argoneus> wouldn't it be better to make it 20 instead, and move the next ones up by 10
15:17:04  <argoneus> just to be sure
15:17:18  <andythenorth> by typing your entire program again? :o
15:17:33  <argoneus> oh right
15:17:42  <andythenorth> oh there was renumber
15:17:42  <Alberth> I had the BASIC editor by Acorn which was really great here
15:17:45  * andythenorth forgot that
15:18:08  <argoneus> I heard an anecdote from the punched card era
15:18:15  <argoneus> that you made the holes
15:18:18  <argoneus> brought it to the lab
15:18:23  <argoneus> and they compiled it until the next day and gave you results
15:18:35  <argoneus> not sure how real that is but sounds like a pain
15:18:35  *** fjb_mobile [] has quit [Remote host closed the connection]
15:18:44  <Alberth> that was very real
15:18:45  <andythenorth> real enough
15:18:58  <Alberth> never actually did it, but I'd sure like to try that once
15:19:04  <andythenorth> not vastly different to doing, e.g. commercial printing
15:19:12  <andythenorth> where you send proofs off on disk
15:19:16  <andythenorth> and get the results
15:19:32  <andythenorth> and realise that the CMYK layers have too much bleed or whatever
15:20:52  <argoneus> lol
15:23:16  <andythenorth> or even just a slow test run on jenkins :(
15:23:30  <andythenorth> if your test suite runs overnight, you don’t know if you can ship until the next day
15:23:36  <andythenorth> and if you failed, you go round again
15:23:52  *** fjb_mobile [] has joined #openttd
15:24:10  <argoneus> oh right, tests
15:24:14  <argoneus> even if I scheme out my program
15:24:18  <argoneus> I don't know how to scheme out tests :(
15:24:33  <argoneus> do I basically want to make sure every class gives right output given an arbitrary input?
15:24:43  <argoneus> and that every class is self contained to a degree
15:24:47  <Eddi|zuHause> my computer science professor said that we should all learn programming the punchcard way, where the feedback only comes a day later, so you have to focus more on getting it right the first time
15:25:03  <Alberth> classes do not give output
15:25:09  <Alberth> methods in them do
15:25:41  <Alberth> basically you want to make sure they do what you think they should do, in particular in corner cases
15:26:13  <Alberth> empty lines, long lines, single word lines, etc
15:26:47  <Eddi|zuHause> argoneus: whether you allow arbitrary input and do sanity checking in the class, or whether you require sanity in the first place (and do the sanity checking in some earlier step), is part of the class contract
15:27:09  <Eddi|zuHause> argoneus: particularly with user input, it's better to make more sanity checking
15:28:31  <argoneus> so for example a MessageParser class that takes messages from irc and parses them doesn't really need testing
15:28:42  <argoneus> because the messages irc servers send you are always the same format?
15:28:55  <Eddi|zuHause> the opposite
15:28:56  <Alberth> what does "parses" mean?
15:29:14  <Eddi|zuHause> when you know the format, testing gets easier
15:29:16  <argoneus> like figures out if it's ctcp, of a pm, or a channel message, then splits it into parts and spits it out
15:29:20  <andythenorth> presumably splits them for command keywords and such?
15:29:20  <argoneus> I think?
15:29:33  <Alberth> ok, so how do you know it works?
15:29:39  <argoneus> I try it once
15:29:40  <andythenorth> and possibly cleans input for possible attacks
15:29:40  <argoneus> :<
15:29:45  * andythenorth doesn’t know how to attack an irc bot
15:29:53  <Alberth> unplug it :p
15:29:53  <argoneus> andythenorth: from my experience
15:30:02  <argoneus> you can crash many irc bots by sending random bytes to a channel
15:30:03  <Eddi|zuHause> argoneus: the point of a test suite is to test it every time you made a change
15:30:08  <argoneus> because they try to force it into utf8
15:30:08  <andythenorth> run it on a disposable VM with no external connections :P
15:30:35  <argoneus> but what client lets you send bytes into a channel, right
15:30:40  <Alberth> argoneus: you make a change elsewhere, how do you know the parser still works?
15:30:59  <argoneus> Alberth: well, it gets messages from the irc server
15:31:03  <argoneus> so it's not my fault if it breaks
15:31:14  <argoneus> testing networked things is tricky :<
15:31:24  <Alberth> you don't have code that gives stuff to the parser?
15:31:35  <argoneus> I don't have any code yet >_>
15:31:50  <Alberth> you will not have code that gives stuff to the parser?
15:32:29  <argoneus> I probably will
15:32:33  <argoneus> but it will probably be a direct pipe from socket
15:32:52  <Alberth> so why do you think the parser will only get data in the right format?
15:33:08  <Alberth> you may mess up somewhere without realizing
15:33:21  <Eddi|zuHause> argoneus: that is how security vulnerabilities are made
15:33:45  <argoneus> so I want to write a test
15:33:48  <argoneus> that parses a proper message
15:33:51  <argoneus> and a test that parses gibberish
15:33:53  <argoneus> and they both should pass?
15:34:01  <Eddi|zuHause> yes
15:34:06  <argoneus> now to figure out how ._.
15:34:10  <andythenorth> there are still industry debates on test methodologies
15:34:11  <argoneus> I should look up existing examples
15:34:12  <Alberth> and probably more than 2 :)
15:34:19  <andythenorth> but I would focus on tests that fail
15:34:22  <argoneus> I'm still not sure if I want to test the class as a whole
15:34:25  <argoneus> or test method by method
15:34:35  <andythenorth> green lights are actually not information
15:34:36  <Alberth> one method at a time
15:34:39  <andythenorth> red lights are information
15:35:00  <argoneus> so my test does something like
15:35:05  <Alberth> andythenorth: yep, trying to convince my co-worker of that, but it's not quite working
15:35:06  <argoneus> instantiate the class I want to test
15:35:13  <argoneus> feed it arbitrary info
15:35:15  <argoneus> and assert various methods?
15:35:16  <andythenorth> Alberth: I have seen some really dumb shit in tests
15:35:29  <Eddi|zuHause> argoneus: yes
15:35:38  <Alberth> you feed it known data, and thus know how it should react
15:36:02  <andythenorth> setattr(foo, ‘bar’, 1)
15:36:08  <andythenorth> asset( == 1)
15:36:10  <andythenorth> assert *
15:36:16  <andythenorth> wtf is the point in that :)
15:36:18  <Eddi|zuHause> argoneus: basically you want to check for whether the result of each method is the same as in the previous run
15:37:04  <argoneus> but then if I make a change to the class
15:37:07  <argoneus> I need to change the tests too
15:37:08  <argoneus> ;_;
15:37:15  <Eddi|zuHause> argoneus: yes.
15:37:20  <andythenorth> ideally you want to run it without changing the tests
15:37:27  <andythenorth> and check that the expected tests fail
15:37:35  <andythenorth> then change the tests
15:37:36  <argoneus> all this discussion
15:37:45  <argoneus> really makes me feel like I should sketch things out and consult someone experienced what he thinks
15:37:47  <Alberth> argoneus: only if the functionality of the method changes, if all is correct
15:37:49  <Eddi|zuHause> argoneus: but if you make non-functional changes like refactoring, you want to keep the test the same
15:37:51  <argoneus> at least until I get a feel for it
15:38:02  <andythenorth> jumping into test-driven development is a big step
15:38:12  <andythenorth> you have to know how to have a test-runner framework
15:38:19  *** shirish [] has quit [Remote host closed the connection]
15:38:20  <andythenorth> and how to break up classes for tests and all that
15:38:28  <Eddi|zuHause> argoneus: or if you extend the functionality by a different command, then you want the tests for the existing commands to not change
15:38:31  <andythenorth> it’s like climbing a wall imo
15:38:48  * andythenorth would figure out what manual testing you’re going to do
15:39:02  <andythenorth> do it once, then use scripting or gui automation app to write yourself some tests
15:39:09  <andythenorth> then find your common mistakes and failure points
15:39:18  <andythenorth> and write simple guards against them directly into your code
15:39:36  <andythenorth> testing at the unit level is boatloads of work for possibly limited result
15:40:48  <andythenorth> (automating your repetitive manual testing is one thing; writing guards in your code is another thing, totally unrelated) :)
15:41:50  <planetmaker> asserts are a good invention :)
15:41:50  <Eddi|zuHause> andythenorth: guards in your code is for when the real world is more complicated than your tests could predict
15:42:08  <Eddi|zuHause> which is more common than you would think :p
15:46:08  <andythenorth> I have written guards for dumb stuff like “andythenorth has assigned duplicate IDs to vehicles"
15:46:19  <andythenorth> which nmlc will find, but my guard finds it in 5s, not 1 min :P
15:46:32  <andythenorth> Alberth: do we have tests for eints? o_O
15:46:41  *** TheMask96 [] has quit [Ping timeout: 480 seconds]
15:47:29  <Alberth> nope
15:47:33  <planetmaker> :)
15:47:35  <Alberth> unless you wrote them
15:48:06  <andythenorth> nah
15:48:10  <andythenorth> not I
15:48:17  <planetmaker> it probably would be suitable for some tests... but then... there's a big test running anyway 24/7 :P
15:48:36  *** Celestar [] has quit [Ping timeout: 480 seconds]
15:49:45  <Alberth> we do have 66 asserts
15:50:20  <Eddi|zuHause> andythenorth: i have a check like that as well
15:50:55  <Alberth> planetmaker: I think it's mostly idling :)
15:50:55  <Eddi|zuHause> andythenorth: and also a check that says "you left some IDs empty"
15:51:03  <Eddi|zuHause> andythenorth: but that is not an error, just a hint
15:51:20  <Alberth> nah, one should use all IDs :p
15:51:33  <andythenorth> moar trains
15:51:59  <planetmaker> :)
15:52:15  *** TheMask96 [] has joined #openttd
15:54:29  <andythenorth> so I thought for Road Hog: freight trams until 1920s -> trucks after that
15:54:40  <andythenorth> but that’s only because Realism
15:54:45  <planetmaker> yup :)
15:54:52  <andythenorth> and it’s boring being forced to rebuild route types
15:55:07  * andythenorth thinks maybe trams -> always
15:55:10  <andythenorth> trucks -> always
15:55:25  <planetmaker> +1
15:55:34  <andythenorth> realism can whistle
15:55:43  <planetmaker> for exactly the reason you said: boring to be forced to rebuild
15:55:59  <planetmaker> realism people can still play it realistically. No need to use every vehicle
15:57:15  <Eddi|zuHause> andythenorth: it's like omiting a wagon for livestock
15:57:41  <andythenorth> also they can use ‘hide'
15:58:01  <andythenorth> also I can differentiate between the two types
15:58:02  <Eddi|zuHause> also, freight trams existed way later than 1920s
15:58:09  <andythenorth> not in Realistic Britain
15:58:16  * andythenorth does Unrealistic Britain
15:58:33  <andythenorth> this way, trams don’t have to progress nicely to trucks
15:58:51  <Alberth> Fun Britain
15:59:25  * andythenorth should have thought of this ages ago
15:59:32  <andythenorth> it’s obvious in retrospect :(
15:59:38  <andythenorth> and it’s how Iron Horse does it
16:00:10  <Alberth> good ideas always happen after you have exhausted all the less-good ideas
16:01:36  <andythenorth> if we had roadtypes...
16:01:50  <andythenorth> we could repeat this discussion for each type :P
16:06:47  <argoneus> I wonder if it's bad that #openttd became #programminghelp to me
16:07:45  <Alberth> argoneus: as long as you don't mind people talking off-topic about some weird old game, every now and then :)
16:09:08  <argoneus> lol
16:09:17  <argoneus> I wouldn't be here if it weren't for that game
16:09:18  <argoneus> so im happy :3
16:45:08  *** tokai [] has joined #openttd
16:45:11  *** mode/#openttd [+v tokai] by ChanServ
16:58:20  <andythenorth> bbl
16:58:21  *** andythenorth [~Andy@] has quit [Quit: andythenorth]
17:32:44  *** Wolf01 [] has joined #openttd
17:32:47  <Wolf01> o/
17:32:52  <Alberth> hi hi
17:33:58  *** glx [] has joined #openttd
17:34:01  *** mode/#openttd [+v glx] by ChanServ
17:42:54  *** Progman [] has joined #openttd
18:19:57  *** andythenorth [] has joined #openttd
18:20:17  <Alberth> evenink andy
18:20:32  <andythenorth> hi
18:21:19  <andythenorth> so narrow gauge trains are slow and low power, but cheap for track and vehicle costs (buy and run)
18:21:31  <andythenorth> metro trains are slow, but insanely high capacity, and accelerate fast
18:21:49  <andythenorth> electric trains are high power and expensive
18:21:58  <andythenorth> all relative to ‘normal’ trains
18:22:06  <andythenorth> so how do trams and RVs differ?
18:22:25  *** JacobD88 [] has joined #openttd
18:25:17  <Alberth> pax vs non-pax ?
18:26:06  <Alberth> or being cheaper, I guess
18:26:34  <Alberth> although I rarely care about costs, as long as the sum is not negative
18:29:02  *** JacobD88 [] has quit [Quit: JacobD88]
18:36:32  <andythenorth> for RVs and trams, the costs are probably a narrow range anyway
18:36:48  <andythenorth> speed, capacity, power are the interesting dimensions I guess
18:37:09  <andythenorth> also sensitivity to slopes (TE)
18:40:23  <Alberth> high capacity and fast acceleration sounds expensive to me
18:45:14  *** Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has left #openttd []
18:49:18  *** fjb_mobile is now known as Guest3872
18:49:19  *** fjb_mobile [~frank@] has joined #openttd
18:54:49  *** Guest3872 [] has quit [Ping timeout: 480 seconds]
18:58:13  *** smoke_fumus [~smoke_fum@] has joined #openttd
19:00:11  *** Progman [] has quit [Remote host closed the connection]
19:02:54  *** fjb_mobile [~frank@] has quit [Quit: Bye]
19:03:11  *** fjb_mobile [] has joined #openttd
19:20:14  *** fjb_mobile is now known as Guest3876
19:20:15  *** fjb_mobile [~frank@] has joined #openttd
19:23:56  *** tokai|mdlx [] has joined #openttd
19:26:10  *** tokai [] has quit [Ping timeout: 480 seconds]
19:27:33  *** Guest3876 [] has quit [Ping timeout: 480 seconds]
19:30:08  <Eddi|zuHause> andythenorth: trams are higher capacity
19:30:26  <andythenorth> small trains
19:31:53  <andythenorth> so the trucks are 30-40t depending on generation
19:31:58  <andythenorth> which I have tested in game and is good
19:32:07  <andythenorth> trams - 80t, or 120t?
19:32:17  *** fjb_mobile [~frank@] has quit [Read error: Connection reset by peer]
19:32:25  <andythenorth> seems a bit high actually
19:32:56  <andythenorth> 50-60t ?
19:33:17  <Eddi|zuHause> 80-120 sounds good, actually
19:33:32  <andythenorth> means they need quite high HP
19:33:35  <andythenorth> to reach a decent speed
19:34:04  <Eddi|zuHause> speed should be low, 20-60km/h
19:34:33  <Eddi|zuHause> meaning trucks will always outperform trams in speed
19:34:52  <andythenorth> I’m balancing against I
19:35:02  <andythenorth> ...IH narrow gauge
19:35:08  <andythenorth> which is 40-55mph
19:35:12  <Eddi|zuHause> no idea how that works
19:35:25  <andythenorth> 65km/h
19:35:38  <andythenorth> be weird to have trams that outperform the trains
19:42:39  *** Riestat2 [] has joined #openttd
19:44:00  <Riestat2> hey guys anyone have any info on why the auto generated letters that are manditory for joining this site are not working? Keep receiving an error message :(
19:44:51  *** jottyfan [] has joined #openttd
19:48:12  <blathijs> Riestat2: Seems like they worked now? I'm assuming you mean the blurry image you have to type in to access the webchat? :-)
19:55:04  *** Rejf [] has quit [Quit: leaving]
19:55:09  *** Rejf [] has joined #openttd
20:08:26  *** sla_ro|master [slamaster@] has quit []
20:11:37  *** supermop [] has joined #openttd
20:19:39  *** supermop [] has quit [Ping timeout: 480 seconds]
20:44:59  *** Defaultti [] has quit [Quit: Quitting.]
20:45:48  *** Defaultti [] has joined #openttd
20:47:02  *** liq3 [] has joined #openttd
20:47:09  *** Rejf_ [] has joined #openttd
20:47:11  *** Rejf_ [] has quit []
20:51:25  *** andythenorth [] has left #openttd []
21:13:13  *** urdh [] has joined #openttd
21:26:24  *** Supercheese [] has quit [Remote host closed the connection]
21:26:33  *** urdh [] has quit [Remote host closed the connection]
21:49:43  *** JacobD88 [] has joined #openttd
21:51:48  *** JacobD88 [] has quit []
21:52:22  *** jottyfan [] has quit [Quit: Konversation terminated!]
21:55:26  *** Progman [] has joined #openttd
21:58:40  *** roidal_ [] has quit [Quit: WeeChat 1.2]
22:02:10  *** Phoenix_the_II [] has joined #openttd
22:05:38  *** wicope [] has quit [Remote host closed the connection]
22:12:27  *** Progman [] has quit [Remote host closed the connection]
22:16:07  <Terkhen> good night
22:17:49  *** Supercheese [] has joined #openttd
22:22:08  *** urdh [] has joined #openttd
22:32:22  <Supercheese> airport tiles can access the variables of the parent airport in switch blocks, right?
22:32:45  <Supercheese> switch (FEAT_AIRPORTTILES, PARENT, ...
22:52:04  <Wolf01> 'night
22:52:09  *** Wolf01 [] has quit [Quit: Once again the world is quick to bury me.]
23:01:59  <Supercheese> aargh, I cannot remember which airport set had the skidmarks on the runways
23:08:30  *** Geth [] has quit [Quit:  HydraIRC -> <- *I* use it, so it must be good!]
23:14:00  <Supercheese> oh it was TTRS
23:23:03  *** zeknurn [] has quit [Read error: Connection reset by peer]
23:23:54  *** zeknurn [] has joined #openttd

Powered by YARRSTE version: svn-trunk