« first day (1648 days earlier)      last day (3302 days later) » 

3:00 PM
And maybe to finalise API design
 
TDD can also help you design the interfaces and worry about the implementation later.
 
I use tests to make sure my code is testable and to make sure I can keep it clean and refactor it often
 
@thecoshman It's the "always" and "never" that are so frequently used by people advocating for it that makes it stupid.
 
I just wish that the fucking company I work for actually did stable, repeatable testing.
 
In which case you get interfaces that are likely inadequate
@ShotgunNinja You can do it on your own
 
3:01 PM
@Griwes note really... just misrepresentation.
 
uh ffs you can't see the location of messages from PC/web facebook
 
@AndyProwl Haha refactoring
 
how fucking dumb is that
 
What's that, a privacy feature on bookface?
Shocking, must be a bug
 
@R.MartinhoFernandes remember when you found your surface pro filled up with temp files from VS installs? Microsoft has a fix now
 
3:01 PM
@Griwes The "always" and "never" are pretty much part of learning a new discipline. Once you're Glenn Gould, you can play the piano the way you want.
 
@CatPlusPlus no, it's just lacking in the web version
in mobile chat you can click on the message to get GPS coordinates
of course the person has to share that with you
on PC you just see "sent from X"
can't seem to find a way to get exact position
 
bah facespace
 
user1804599
Andy do you do anything with SQL?
 
people still use it? I thought it was just a phase
 
@Nisk what alternative do you propose?
 
3:04 PM
@rightfold I did once, not anymore
Apart from really basic stuff
 
user1804599
How do you design CRUD APIs?
 
@AndyProwl The "always" and "never" would make me unable to write actual code for a long time.
 
@BartekBanachewicz we've covered this already, lack alternatives does not make the dominant solution any less crap
 
Especially since the advocates seem to be saying that each possible part of a feature should be implemented gradually.
 
@Griwes not at all
 
3:05 PM
@Griwes I understand that, but being sloppy in the beginning is part of the learning process
Learning to play scales is not fun either and the fingering is not intuitive at all
 
Write an useless part of a function, then write a part that makes no sense on its own, then write a tiny piece of actual logic, then...
 
@rightfold s/CR/K/, s/D/T/
 
it forces you think about what you acutally need
 
@BartekBanachewicz I'm the wrong person to ask that, I don't have any personal social networks. I heard there's joindiaspora.com never tried it though
 
3:06 PM
Alright, let me say it. Writing software (a single piece of software) is nothing like learning to play some instrument.
 
@Griwes TDD does not dictate at what level you test btw.
 
@AndyProwl That's what she said
 
Learning to program? Sure. Writing a piece of software? Err no.
 
@rightfold I'm not sure I am able to give a general advice
@CatPlusPlus lol I was waiting for that
 
Incremental development is a thing that happens in any non-trivial piece of software
 
3:07 PM
@thecoshman So you are saying it also doesn't help with writing testable interfaces. Yay!
 
user1804599
Do you put insert and update and read and delete functions in the same interface?
 
You need a function, define a test for that function, thinking about what you want to be passing and what you want out. If it takes a dozen other functions to implement, so what. But maybe those other functions should be covered by tests too, especially if they want to be reusable.
 
@Griwes That's not what he said
 
@Griwes It's about learning a new discipline in both cases
 
@CatPlusPlus Sure. Incrememental overall, not incremental within a single function.
 
user1804599
3:07 PM
I like to keep them free functions but then DI becomes a PITA.
 
@Griwes not at all...
 
@thecoshman too bad. If crap's the only thing you have you gotta live with that
@Nisk well not much for a recommendation then.
 
I liked "Growing OO Software with Tests"
 
@CatPlusPlus We do incremental development for our websites, but they're such large properties that we can't possibly do full integration testing, and end up deploying several large bugs in almost every release.
 
or something like that
 
3:08 PM
@CatPlusPlus He said that I can do TDD and end up with untestable mess at the same time. :P
@AndyProwl Ugh, "OO software"
 
@Griwes Stop picking stupid extremes to prove your crappy point
 
pehraps they make too heavy use of mocks but it's a great book
 
@BartekBanachewicz and of course just settle for crap and never point out what could be better.
 
but again, these are e-commerce websites; they're not really stable pieces of application software.
 
@Griwes why not?
 
3:08 PM
@thecoshman no, why? There's a lot of things that could be better with facebook.
but it's also improving quite a lot.
 
@ShotgunNinja Your process sucks
 
@Griwes I'm not offended by "OO"
/runs away
 
Design probably too
 
@CatPlusPlus yeah no shit
 
@BartekBanachewicz highlighting it exists more so than recommending, to be sure.
 
3:09 PM
What design?
 
perhaps they make too heavy use of mocks but it's a great book
 
@thecoshman I am writing a function I have to figure out. I don't want to have to jump to tests and back while writing steps done in that function, its internal error checking and shit.
inb4 you are not dividing your code enough
 
We have an amalgam of a few reasonably-decent systems bundled with a bunch of really shitty code, and no one knows how one change is going to affect other portions of the site because nothing is fucking documented.
 
@Griwes did I... please explain how you came to conclusion, because that was not my intent.
 
@AndyProwl YOURE TOO MAINSTREAM
 
3:10 PM
lol
 
@CatPlusPlus Stop it rightfrown.
 
@ShotgunNinja Bad programmers
 
Right, but boost property tree does have an xml_parser which uses rapidxml as its underlying implementation. And as far as I can tell, rapidxml does allow parsing a doctype node. But from digging through the boost code, it seems that boost doesn't take advantage of it. — Ben J 7 mins ago
 
@thecoshman "you can have tests at any level" so the "internals" aren't necessarily testable.
 
Case #453 of "Property Tree absue as XML/JSON library".
Grrrrr
 
3:10 PM
@CatPlusPlus 15 years of bad programmers.
 
Boost does take advantage of it. To implement Property Trees. What did you expect? — sehe 39 secs ago
 
@Griwes nor should you... you test the 'public face' of the function. "I give you 4 and 5, I want you return the sum of those two".
 
@ShotgunNinja Who needs docs?
 
user1804599
I should look into one of those autowiring tools for DI.
 
@Griwes I said TDD does not dictate what level you test at.
TDD can be applied to many levels
 
3:11 PM
inb4 ATDD
 
from low level functions right up to the full end to end system.
 
@thecoshman Yes. But if you give it -1 and -2, it throws an exception.
 
there is literally 15-year-old Java 1.5 code in the core of our internal main libraries that we are unable to get rid of without a lengthy refactoring process because my boss has no concept of code smell
 
BDD is absolute garbage though regardless of TDD merits
Fuck shitty rubbylike DSLs
 
> You have fully used your vote allowance for today
 
3:12 PM
We only refactor things when they break or there's a random security concern that someone posts about online.
 
fuck, that was fast
 
our codebase has code from 1993 with comments like "This code should not be used after 2003"
 
@Griwes did I have that requirement? no-> done, yes-> did I have a test? no-> write one. run test-> is it passing? yes-> great, no-> write code to fix that
 
@Griwes fuck non total functions
 
@AndyProwl What language?
 
3:12 PM
C++
 
@BartekBanachewicz :D
 
Our codebases devolve into that state in 6 months what do I win
 
it's more C-ish though
 
@AndyProwl Try a codebase in Java EE and Struts 1.x.
 
no, thanks
:P
 
3:13 PM
@BartekBanachewicz FYI that was just a follow-up of a terrible example - with an example that's even more terrible.
 
Get a better job
 
@AndyProwl Better remove those comments. Or update the date.
 
To 1993
 
@CatPlusPlus There's really nothing around here that's any better, except for "startups"
 
@thecoshman Exactly, jumping back and forth between actual code and tests.
FWIW I do write some tests before writing code.
 
3:14 PM
@LucDanton I'd just remove the "after 2003"
 
But not "always", and sometimes I just write code that actually uses a thing first and tests later.
 
"It's easier to mark code that's good"
"You might notice there are no marks"
 
@Griwes so? is it really that hard to have a test file and an implementation file open? The key is that I am going through a list of requirements, for each one make sure I have a test to verify it, then implement that logic.
 
@CatPlusPlus lol
 
Despite the fact that almost everyone here and who ever was here was a bad or halfway-decent programmer, and there's no process for writing tests or eliminating code smell, the management and business side of this company makes it almost worth it, since it doesn't suck.
 
3:15 PM
@thecoshman It's often useless to do that strictly in that order.
 
this links in with agile, theses requirements can be prioritised very easily. Do I need to get the exceptions being thrown from my 'add' function, or get a 'subtract' function done first?
 
we took on a contract in work, to take care of the clients system they had made for them by another company...tomcat, windows server, IE6 (there was no way to work on the code but RDP, complete lockdown, no internet access or version control)....bug, crashes AND the guy wrote his own object-relational mapping in java..
 
@Griwes no it's not! It's about making sure you do shit in the order that it needs to be done.
 
@thecoshman Please don't use "agile" as a noun.
@thecoshman I can do it in any order I want.
 
if you go of and write exception handling code for shit that will never happen I am going to slap you so hard for wasteing time
 
3:16 PM
The order doesn't matter; the effect does.
 
@thecoshman lol?
 
@Griwes sure, and you'll get fuck all done of merit, or maybe you'll get lucky
 
"will never happen" haha
 
If in both cases I end up with the same code and same tests, the order is completely irrelevant.
 
hahahahahahah "will never happen"
hahahahahahahahahahaha
 
3:17 PM
@R.MartinhoFernandes well ok, handly exceptions is important... but the key is the you don't work on features you don't need.
 
> wasteing
@thecoshman lel
 
waisting
 
@Griwes no, something can come first.
 
@thecoshman cockslap
 
@thecoshman Your mom
 
3:18 PM
Implement just a little piece of logic, go to something else, go to the use, then waste time remembering what you could've just written down in the first place.
 
I'm nowhere near that organised
Code is shit, product is shit, who cares, let it die
5
 
Do you want a function that can work with valid inputs, but doesn't throw exceptions when it should, or a function that can does fuck all apart from say you called it wrong? Yes it is two small bits of work, and yes you could do it in parallel probably, but it's besides the point. The priority of features is never parrallel.
 
Hopefully it'll be buried and forgotten in 3 months
 
@Griwes then write the test first vOv for both valid and invalid input
 
@CatPlusPlus I wish I could take that attitude with some of this crap
but fucking hundreds of stores around the world use our shitty old code
 
3:19 PM
I mean... you are going to write tests aren't you?
 
Let them burn
 
@thecoshman Yes, but I'm prototyping!
 
Someone else's problem
 
we're the biggest retailer of our particular type of product in the world
 
The code will change 30 times before the first release!
 
3:20 PM
@thecoshman lol no
 
I hope I'll never be as cynic as you Cat.
 
write both functions, run both, return result selected at random
 
@Jefffrey Hope again
 
@Griwes then you're requirements will be less strict. You may not have to worry about invalid input atm.
 
luckily, I get to tear apart our oldest, nastiest system this year, and rebuild it from scratch.
 
3:21 PM
@CatPlusPlus stop being bad
 
luckily...
 
@thecoshman Then the test is useless (it's better to test it by actually using the code).
 
@thecoshman I don't care to
 
@ShotgunNinja it's going to fail.
 
@thecoshman Well no shit, which is why we're gonna keep fixing it until it works
 
3:21 PM
rotfl I posted my first answer on Programmers.SE that happened to be upvoted 10 times, and I got my "active member for a year, earning at least 200 reputation" badge.
 
and probably make it just as bad (if not worse) than the previous version.
 
@Griwes if tests are useless, it's because they test something you don't need, so the code is useless and both tests and code can be removed.
 
but at least it'll be no less maintainable than our newer code.
which at this point, maintenance of it is a nightmare
it's basically PHP-style code, except with Java
which is literally the worst thing I've ever said about any code ever
 
and so I go back to original point, first get a requirement, write tests for it, then write code to satisfy those tests
 
3:23 PM
oh and did I mention we use CVS on a Win2k box as our main repository
 
lol requirements
 
"Your mother writes Java"
 
any way, home time :D
 
@Griwes What
 
Requirements change every week
 
3:23 PM
@CatPlusPlus sure they do
 
@CatPlusPlus requirements change once every two to three weeks, and then thirteen to fifty times in the last week before release.
 
@ShotgunNinja WTH
 
I swear I deserve a fucking medal for working with this shit
"Shotgun Ninja: Code Archaeologist"
 
@thecoshman lel. reread the part where I said about prototyping thx
 
@ShotgunNinja bitch please, you seen nothing yet.
 
3:27 PM
@Nisk do tell
 
how does one link to an earlier post?
 
just copy-paste the permalink
chat and answer permalinks get oneboxed by chat
 
13 mins ago, by Nisk
we took on a contract in work, to take care of the clients system they had made for them by another company...tomcat, windows server, IE6 (there was no way to work on the code but RDP, complete lockdown, no internet access or version control)....bug, crashes AND the guy wrote his own object-relational mapping in java..
 
@Nisk ohgod
Sounds like the place I worked before this
 
also the RDP was citrix, which would not work from linux for me, so I had to run a windows VM
 
3:31 PM
is there a predefined Haskell combinator that deals with if c then f c else id? (I want to compose an extra function if some condition is met; so f . g . h vs id . g . h as a result of the if)
 
yeah basically there are two types of software companies you can work for here in Milwaukee: Big giant corporations where you spend all day writing the same type of code and having to go through bureaucratic red tape to do anything, or small companies with no understanding of a basic software process.
 
@ScarletAmaranth Is the former supposed to be f c . g . h?
 
I've always preferred smaller companies for the variety of work I get to do, since I get really bored really easily, but it comes at a high cost of having so much external shit govern what you do.
 
@LucDanton ah, yes, if you choose to "couple" the if with the further example :P I just want to conditionally glue on a new function into the composition
 
@ShotgunNinja +
 
3:34 PM
I actually work for a small software department of a mid-sized corporation, and as much as the work environment is nice and the product is awesome, there is so much collective shit in our process and codebase that needs to be excised.
so I decided that I'd work here long enough to trim as much fat as I can.
 
@LucDanton my code is riddled with if something then <add f to composition chain> else <add id to composition chain>
 
@ScarletAmaranth Bool elimination is what I would expect to see.
Although 'why are you using Bool?' is something that also comes up regularly.
 
why not Maybe?
 
@ShotgunNinja admirable, but...you gotta be careful not to do work that no one will thank you for, even if it is the right thing to do.
 
@Nisk oh, there are plenty of people who will thank me for it, since it's been encroaching on our ability to do work for a long time
 
3:38 PM
then go home, drink heavily and weep over your lost innocence and aggregated cynicism
@ShotgunNinja lucky :)
 
@ScarletAmaranth that sort of stuff, if you can grokk it
 
either way, I do what I can to promote improvement with the boss even though I know it's not likely to happen.
 
it doesn’t have to be Maybe per se
 
Moreso because I fucking want it to happen than for any other reason.
Like, I hate working with ancient shit, on ancient tools, with no semblance of a decent process or documentation.
 
@LucDanton it was just an example; yes I understand what Bool technically represents / should represent / etc
 
3:39 PM
and no automation.
Our software products are big enough that we need to stop using baby toys and start using something that will help us actually get things done.
we still do backups during deployment by hand.
 
@ScarletAmaranth Well either id f is the sort of stuff that comes up all the time. I suppose you could go bool f id, too. Morally speaking I don’t really care between using the canonical function or if/case to eliminate a value.
 
@LucDanton I use a very simple x elem xs to decide whether to compose an extra function or not; I don't see any need to make it more robust and / or complicated
 
@ScarletAmaranth that one
Don’t ask me when it comes to the order of arguments.
 
@LucDanton thanks! I always just googled and hoogled to Control.Conditional
 
Stock Hoogle didn’t find it actually. IIRC it’s a recent-ish addition.
 
3:47 PM
@ScarletAmaranth f \/ id . (p?) :D
 
Throwing arrows at the problem is not cool any more. Now it’s all about applicatives (again).
 
Hey guys, what is the difference between using a preprocessor ifndef and define to set a constant and using a global variable?
 
Hmm, p --> (f, id) in some other incarnation, I think.
 
@shadoweye14 for example, type safety
 
meaning?
 
3:49 PM
also, hello everyone
@shadoweye14 google it
 
@R.MartinhoFernandes In papers the most common notation I see is [f, g] (or [f; g]? I forget) if I understand what you are saying.
 
@R.MartinhoFernandes oh, arrows could actually do it; but jesus, I just want to compose f or id to g; can't be that hard
 
p --> (f, id) . g seems easy enough.
If c is a bool, then id --> (f, id) . g
But I don't see a big advantage over using an if there.
 
@BartoszKP Ahh I see now. So is that the only benefit of using global variables over a prepro def ?
 
3:51 PM
@shadoweye14 Googling it?
There's a fucking question on
 
Why is a cat controlling the starboard? First viral videos, now the Lounge? Where is this heading?
 
@shadoweye14 no, but I don't intend to pretend I can give you a complete and accurate lecture on it right now, without using external sources (like google), which are easily accessible to everyone, including you :)
 
omg there's Cat everywhere
 
@LucDanton The parens there are just a hack. The notation it mimics is for McCarthy's conditional, p -> f, g, being \x -> if p x then f x else g x
 
@BartoszKP haha Appreciate the help nonetheless :) I did google it before asking here btw. Was just looking for additional clarification. :)
 
3:53 PM
Is there some sort of saying about how all problems are cache related?
 
@EtiennedeMartel shouldiblamecaching.com ?
it's an URL-saying
 
Aaaaah!
 
@R.MartinhoFernandes Was the first one also in the same vein?
 
clint eastwood is such a great song
 
@LucDanton Yeah. I think f \/ g is the same as that [f, g] you see.
 
3:55 PM
@EtiennedeMartel A couple of them. One of the guys on comp.lang.asm.x86 used to use a tagline to the effect that: "all problems in computer science can be viewed as an exercise in caching", or something similar. Then there's the famous: "there are only two difficult problems in computer science: naming, cache invalidation, and off by one errors."
 
There are no outfix operators in Haskell, though.
 
@BartoszKP Also, oh shit the keming on that.
 
@R.MartinhoFernandes Then the other really is a different incarnation I guess :)
 
p? is a guard on p, meaning \x -> if p x then Left x else Right x
 
scheme ftw
 
3:57 PM
@JerryCoffin isn't it "naming, cache invalidation, and off by one er&*(@&$"
 
@EtiennedeMartel The "Y" forgot to take a shower (for a couple weeks).
Oh, and BTW, hi everybody.
 
@EtiennedeMartel I don't notice such things ;o But it's weird, indeed ;0 maybe it's a caching problem
 
Keming table is being cached.
 
:D
 

« first day (1648 days earlier)      last day (3302 days later) »