Back to Home / #openttd / 2015 / 07 / Prev Day | Next Day
#openttd IRC Logs for 2015-07-03

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