What's wrong with
var x;
if (x == undefined) {
x = 5;
}
? x = x is a no-op, brah.
Possibly that should be "x === undefined". Javascript!
Also, consider the following:
var x = false; x = x || 5; console.log(x)
var x = false; if (x === undefined) { x = 5 }; console.log(x)
You'll be a Python programmer yet. But bear in mind! Too much explicitness is itself confusing.
This is going to be another of those incomprehensible threads, isn't it?
I don't think "||" is that clever; it's well-known. There is another heuristic in programming that you should prefer terseness to verbosity except when it induces complexity. The more you say, the more the reader has to keep in their working memory. "x || 5" is both short and simple. Once you know about short-circuiting and Javascript's fast-and-loose type system, it shouldn't be confusing at all. The first code sample is rambling and is taking up too much screen real estate. I would wonder if the programmer hadn't done much editing before checking in, decreasing my trust in them.
I also have a not-entirely-rational preference for expressions over statements due to their better composition and how they avoid boolean blindness.
As for the latter one, I think that depends upon your community. Expressions of the form (1 - a) and (1 - a/b) come up a lot in graphics programming.
I suspect that in general local style trumps national style, but I think a lot about the inherent advantage native English speakers get when writing most programming languages. Americans--and to a lesser degree other first world programmers learned in English--have baked more of our culture than is probably fair into programming languages.
(maybe this is a high on pot kind of striking)
I really, really hope ogged has a whole long list of things in this category and will share them all. That would be so great!
I don't get this at all. It looks nothing like SAS.
The ? : conditional is one of my favorite features of Java and javascript. Things like || and && doing lazy evaluation are IMHO easier to understand if you start your career writing Lisp, as I did.
BoingBoing is pushing a $20 course on Python. That sounds cheaper than other ways of learning to code.
11: Agreed. As an extended version of that, I enjoy using Java 8's Optional library, a feature that's been a long time coming and works well with lambdas. A trivial example that parallels ogged's example would be
Optional.ofNullable(x).orElse(5);
You can also chain it together with maps, and there's a version of orElse that takes a supplier in case you want the default to not be a constant.
Recently C# added a new operator, ?., which is the same as the object field dereference operator "." but it respects null. If you do a.b.c.d, it'll fail with an exception if a, a.b, or a.b.c is null. a?.b?.c?.d will return null if it hits a null anywhere in the chain. You can do that with ?: or if/else, but it ends up being gross and verbose.
if x is true (that is, not one of several "falsy" values), it will be assigned to x, otherwise the next "truthy" value (in this case 5) will be.
Pedantry alert.
If the left is falsy, it will actually short-circuit to the right, regardless of whether what is on the right is truthy.
0 || false => false false || 0 => 0
Likewise,
&&short-circuits to the first value needed to determine the truthiness or falsiness of the conjunct.
0 && false => 0 true && 1 => 1
8.last:
I think we absolutely do. I've had the conversation with a couple of non-native English speakers on my team about the moment they realized that code keywords like 'for' are just English words with regular meaning that the CS use analogizes to.
Things like || and && doing lazy evaluation are IMHO easier to understand if you start your career writing Lisp, as I did.
|| and && don't do "lazy evaluation".
Or, to be possibly more explicit,
||and
&&(or their analogues
andand
orin e.g. Python) "do lazy evaluation" in otherwise strict languages in exactly the same sense that the ternary condition operator ?: in C-like languages and if/else branching in just about any language "does lazy evaluation", but I think the temptation to say that in
if (d != 0) { return n/d; } else { return -1; }
The division is "evaluated lazily" is pretty much nil.
I find the discussion about short-circuit operators to be interesting. I grew up with them so they seem intuitive to me and most programmers I know think of them as really simple and easy to understand operations.
But I've recently met a lot of programmers with non-traditional backgrounds who've learned to program in the past couple of years and many (most?) of them see short-circuit operators as weird and non-intuitive. This seems like a clear sign that the operators are actually not intuitive at all, but most experienced programmers I know still insist that short-circuiting is an inherently obvious idea.
More-or-less completely unrelated: I am continually exasperated by the incomprehensible errors messages that even fairly major websites still return for form submission errors and the like.
Often I can tell that the "error" is just a standard message to the programmer about what went wrong in the input, and it just boggles my mind that people who run companies are willing to have their sites go live with glaring (and likely to be widely experienced) errors. I'm not talking obscure stuff, here.
I understand QA costs have been but to the bone in many companies, but doesn't anybody even do a paranoid personal run-through to spot obvious errors? I used to do that when setting up ticket sales for a piddly little nonprofit, for heaven's sake.
I think using short-circuited operators in the way shown is both 1) weird, and needs to be explained and 2) not actually difficult once it's been taught. I suppose some curious beginning programmers might stumble upon this functionality on their own by reasoning back from how regular if statements work, but I doubt that's the usual case.
I do think there's a conceptual issue with how these operators are taught, and it might be useful to just flat out say that "||" is an n-ary infix operator that goes through its arguments and executes them until it finds a true/(or in JS, truthy) value and either returns that value or the last default one. I think the real non-intuitive issue here is that we conflate "or" the pure logical binary operator on predicates, and "||", the stateful programming one. Conflating statelessness and statefulness probably ranks up there with the invention of the null pointer in the list of great unforced errors that have held back software.
19: Software in practice is rarely an engineering discipline. (I try not to correct anyone who refers to themselves as a "software engineer", but the term makes me uncomfortable and I avoid using it for myself.) Validation is expensive and there's a lot of places in the pipeline for people to be unprofessional or just screw it up. Or someone did a cost-benefit analysis and determined that fixing a bug isn't worth it.
But I totally get what you're saying. I've had to edit Javascript in the browse to get state government websites that I needed to work. It's unacceptable that a citizen or consumer should have to do that, especially since most can't.
I am in the middle of a software documentation marathon, because of very, very good reasons. How do you all like to see APIs documented? Well done, medium rare? The consensus at work is that all the API documentation is inadequate, but no one has any bright ideas about how to improve it. (Attitudes towards documentation in general range from "The bullet points on page 49 are out of alignment with the header" to "if we build a good product we shouldn't need documentation.")
SELECT DissolvePoliticalBond FROM Courseof HumanEvents
WHERE Necessary IS NOT NULL
I'm pretty much not going to sleep until I kill this thing. It is not getting a second weekend day.
||
My gf and I are visiting NYC and met up with Barry Freed for cocktails and then we joined him for a movie. It was bunches and bunches of fun!
>
||
My gf and I are visiting NYC and met up with Barry Freed for cocktails and then we joined him for a movie. It was bunches and bunches of fun!
>
"x || 5" is both short and simple. Once you know about short-circuiting and Javascript's fast-and-loose type system, it shouldn't be confusing at all. The first code sample is rambling and is taking up too much screen real estate. I would wonder if the programmer hadn't done much editing before checking in, decreasing my trust in them.
Proof you can't win. I hate using conditionals that way, even though I understand what's going on, and if someone bitched at me for writing a simple if/else statement instead I'd be pretty pissed off. At least it's not the ternary operator.
This seems like a clear sign that the operators are actually not intuitive at all, but most experienced programmers I know still insist that short-circuiting is an inherently obvious idea.
If I'm feeling dyspeptic, my response is that this is a demonstration of the fact that most experienced programmers are assholes to newbies. (Developers complaining about users is the extreme case of this.) More charitably, it's probably down to the curse of knowledge.
Did you like the part of Angry Birds where they discover the mighty eagle is pissing in the pond?
He has refused assent to our punctuation.
29: With regard to the editing I was referring to the point that nosflow made in 1 about "x = x". That looks like someone did some refactoring and didn't closely pay attention to what they typed. In general I'm fine with if statements, but as I said I think there's an advantage to keeping things as expressions as much as possible--it keeps you closer to the type system and avoids repetition (e.g. having two assignments when you can have one). In a block anything can happen, making looking at the if/else as a whole is less useful. This forces the reader to dive into both blocks to guarantee that nothing untoward was done. If you want to do something complex, that's fine, but if you're doing something simple, why are you throwing away the type system and taking more screen real estate/conceptual space to do it?
I wouldn't complain if someone used an if/else, but if I had to maintain the code I might rewrite it to make it more readable to me.
I admittedly don't use the short-circuited operator assignment very often since I write mostly in Java and it doesn't have truthy values, so they aren't as useful outside of conditionals.
I'm rehashing one of those dumb old fights, aren't I? My preferred text editor is vi and the Super Nintendo was better than the Genesis.
"||", the stateful programming one
What's stateful about short-circuiting logical operators?
In general I'm fine with if statements, but as I said I think there's an advantage to keeping things as expressions as much as possible
Periodic reminder that many languages do not have "statements" and if-else expressions result in a value.
22: I'm a fan of documentation that's auto-generated from comments like Doxygen or Javadoc--I presume you're using something like that? Specify pre-conditions and post-conditions, possible errors values or exceptions, and explain the semantics of each argument. I tend to not mind if that last part is limited/incomplete if it's blindingly obvious; good argument names help there. I can be a massive hypocrite on this and I'm lazier about documentation than I should be.
"if we build a good product we shouldn't need documentation."
I would look very crossly at that person.
dalriata's apparent faith in the comment-writing practices of the average programmer is charming.
34: They allow side-effects and are often used for such.
35: We're pretty clearly not talking about those languages and I'm trying to avoid ranting about how everything should be function. Anyway, if :: Bool -> A -> A is just the ternary operator under a different name.
What's with the unmatched double quote in the final example? Is that a JavaScript thing?
s/function/functional/
37: I'm not sure what I said that implied that?
39: That threw me off at first, but if you highlight it you'll see that it's actually two single quotes. JS allows both single and double quotes to delimit strings, and they chose to represent the empty string with single quotes. Saves pressing the shift key, I guess?
34: They allow side-effects and are often used for such.
All that means is that they occur in languages in which side-effects aren't checked, but there's nothing about short-circuiting binary operators that requires that they so occur. There are strict variants of Haskell (I'm assuming that ML doesn't count because of its reference cells/"benign effects") in which it would still be possible to express, perhaps with language-level support as in other strict languages, short-circuiting boolean evaluation.
42: That is true but doesn't have much to do with how these are used in practice in imperative languages.
I am very skeptical of the idea that the fact that side-effects are promiscuous in C et al. accounts for the non-intuitiveness || and friends.
37: I'm not sure what I said that implied that?
Auto-generating documentation from code comments isn't worth much if the comments aren't up-to-date, clear, etc. in the first place—i.e., if they aren't already admirable instances of documentation. (I read the stuff following your question as what you presumed they were already doing, perhaps erroneously.)
42: That is true but doesn't have much to do with how these are used in practice in imperative languages.
Aside from "blah || exit(1)" are these operators actually used much with side-effects in imperative languages? Offhand I don't think I've written anything side-effecty with such operators in the past two years.
I mean, they're no
while((c = getchar()) != EOF).
45.first: Maybe. Something like if(tryAndDoSomething() || doSomethingDestructive()) can be scary to new developers if they've gotten into the habit of thinking of boolean operators as being pure.
45.last: No, I was giving my opinion as to how those comments should be written; if this API is being described at some other granularity than function calls, other practices might be appropriate. I'm assuming that right now it sucks and lurid keyaki is going to turn it into a document that so perfectly encapsulates the truth that developers will break down and cry at its beauty. Or at least it'll be better than how things are, which is all we can ever hope for.
I accept that it's not the only thing that's strange about short-circuiting, and I did mention other issues with it. But I see them used with side-effects fairly often.
I'm guilty of doing stuff like 47. It's awful/convenient, but definitely confusing and for some of the same reasons.
I wish I didn't have to use Python for work :(
Aside from "blah || exit(1)" are these operators actually used much with side-effects in imperative languages? Offhand I don't think I've written anything side-effecty with such operators in the past two years.
I see them used a bit for conditional logic in JS in, for example, templating that allows for insertion of arbitrary expressions but not statements.
For ex:
{{ warningSet && "Password is invalid."}}
neb, what do you not like about Python and what would you rather use instead?
Also unfogged is my absolute favorite programming forum bc it's the only one where people don't bullshit and dick-measure about knowledge of technologies. People don't really care about admitting they don't know stuff here.
And I wish I used Haskell or OCaml or even Scala instead of Java, but it suffices. Every year it becomes a little bit easier to write functionally.
I'm bad at recognizing when I'm bullshitting and/or* dick measuring, and I feel like I'm being obstinate so I apologize for any dickishness. What I've been saying are opinions and idiosyncratic preferences that I've sometimes found useful and won't work for everyone. I'd also say that in my growth as a developer I'm in a bit of a rut, since I tend not to do much programming outside of work.
* English "or" can be XOR or OR, but isn't it weird that "and/or" is definitely OR?
neb, what do you not like about Python and what would you rather use instead?
Something with an at-least-ML-level type system and sum types.
Interesting. I ask because while every JavaScript programmer is unhappy in the same way, every Python programmer is unhappy in their own special way. I like to keep track.
Which ones are unhappy in the traditional way where you have affair that takes more pages to describe than the phone book and has less sex?
53 Don't know stuff? You're telling me. The only comment I understand is the one you posted about our meetup.
59 which btw I greatly enjoyed as short as it was.
A long meetup would have really been horrible for you?
My daughter went through a brief phase of making remarks like 61, when she was 3 or so. I would say "Mmmm, my coffee tastes really good this morning" and get the response "Does it not taste good on other mornings?"
Thanks, dalriata. I aim to make everyone cry, but indeed neb's objection is one of the things that has come up.
Also: is there a logical operator that is something like "only", so that I can search for rows where the FRUIT column contains only KUMQUATS and not KUMQUATS, LEMONS or KUMQUATS, LEMONS, CHERRIES? Or is there no way around excluding each other fruit one by one? We tried to do this recently in Jira and couldn't, and I was very displeased.
56: Every now and then I need to hack around the lack of sum types and it's always awful. Haven't come up with something I'm happy with. And it doesn't seem like it should be that hard to add a version of it to Java's type system and syntax: just allow classes to be final except for a specified list of subclasses. There are some libraries that emulate pattern matching that would play well with that.
59, etc: It's awesome that you managed to set up a more-or-less(?) impromptu meet-up while you were both traveling.
60 not at all it's just that I made Trivers and his gf (who clearly needs an Unfogged suitable pseud) work around my obsessive cinemania.
62: Is this search in JIRA? Doesn't the "=" operator do that?
[Incidentally, what on earth are you people doing up, and here?] = is not exclusive -- it will find issues assigned to fix version = 1.1 but can't exclude issues assigned to fix version = 1.1, 1.0.9, 1.0.7. However I was suddenly excited at the idea that you could put = in quotes and make it exclusive. I have just confirmed that that doesn't work.
Also unfogged is my absolute favorite programming forum bc it's the only one where people don't bullshit and dick-measure about knowledge of technologies. People don't really care about admitting they don't know stuff here.
I guess Barry has already covered this, but I too understand nothing in these conversations and have no shame in admitting that.
[Incidentally, what on earth are you people doing up, and here?]
I know this was directed at the east-coast types, but it's only 9 pm here.
It's 4:45 a.m. in my home office, although the clock claims otherwise.
This is like the "windchill factor" or whatever. It "feels like" 4:45 a.m.
Meanwhile, here it's 9 but feels like 4 or 5 because midnight sun. It is overcast, though, so there's that.
57: neb is... not representative of all Python programmers. I'm perfectly happy with the language itself. (Packaging and distributing it is a different story.)
I'm on the train out to LI coming back from an evening full of movies and sexing Mutombo meetups.
I stayed out too late last night so I'm on a late sleeping schedule, and I'm home since we spent today cleaning house for in-laws visiting tomorrow.
67: Ugh. That...is garbage, and sort of goes against the documention. Possibly stupid idea that I can't confirm since we don't have many multi-valued fields with actual multiple values in our JIRA: FixVersion supports the inequality operators, right? Does this work?
(NOT FixVersion > 1.1) AND (NOT FixVersion < 1.1)
"Right Now, Wrong Then," "Shaolin Soccer," "The Hole," and "Cosmos"
And here it actually is 6:33 and I am already stuck into procrastination
Is it true what I saw on Twitter, that no freelancer in the UK (whose work is not literally commenting about Brexit, perhaps) has gotten anything done since 6/23?
80 is GENIUS but sadly we have some version numbers with alpha characters... so it probably wouldn't work. Rats.
84: not without going into the office so someone can tell me there will be a big white hole in tomorrow's paper if I don't get {x} written by this evening, where {x} has nothing to do with British politics.
84: Christ, yes. I overran a major deadline on Friday, because I was in such pieces that I got literally nothing done for a couple of days after the result. The Japanese client is pissed and politely incomprehending of the effect of a political earthquake on the freelance brain. Fortunately I've been working for them for years and they know it's out of character.
I'm further north than Teo, sun went down at midnight, it never got darker than vaguely dusky, and started getting lighter again at 2, sunrise at 3. The place we're staying is having some work done and contractors show up at 9 or 10 pm because they can. Also outdoor swimming pools open until 10pm. Everything is closing early today for a soccer game though.
16 et al.
Sorry about that, I wasn't clear. In Lisp-like languages the distinction in behavior between
(or (foo) (bar))
and
(bletch (foo) (bar))
where foo or bar have side-effects, isn't always immediately obvious to beginners.
JavaScript is a special case where terseness actually counts for something - all that .js has to get shuffled-off to webpages eventually, so size matters. (and should matter a lot more, IMO). this is so important that there are even programs out there that will do it for you: closure.
also, because js is usually going to be public, terseness helps to obfuscate your precious algorithms.
with compiled languages, any good compiler would boil the first two examples down to the same thing. so terseness is simply obfuscation.
84: I think that doesn't matter. The documentation says that you can use all the inequality operators, and it gives an example where a query looks for a fixVersion that's completely alphabetic. I think that the comparison operators are just treated lexicographically, which should be sufficient for your needs.
Anyway, JIRA makes me sad. It requires such a specific way of thinking about things that doesn't necessarily map well onto the project or how anything thinks. I'm also biased against Agile practices in general.
Does manually rewriting your JS gain you much of anything over just running it through an obfuscator? That perspective seems like a cousin of premature optimization.
And I think terseness is more than obfuscation, but I may be using the word differently from you. Code should be as long as it needs to be. Playing golf with your character count is going to be unreadable, but taking up too much space on simple things is also going to be unreadable. It's just like writing in general--are you saying something that needs a paragraph or just a sentence? (The irony that I'm a windbag in English is noted.)
90
I'd love to find a system that integrates requirements, tasks, bugs, fixes, etc. but isn't an eldritch horror from beyond the universe we know. If it did agile reasonably well that would be nice, too. We are using TTPro but every time I use it I can feel brain cells dying.
53 puzzles me given unfogged's long proud tradition of dick- measuring.
67: Ugh. That...is garbage, and sort of goes against the documention.
Something related to JIRA was garbage?! You don't say!
81: that's a lot of movies. Did you squeeze the non-movie portion of the meetup into a spare half hour in between?
93: We don't use dick measuring as an analogy.
Hey Barry, I don't know if it's widely available but I took the girls to see The Fits and they totally loved it. Nia recognizes the housing complex where the main character Toni lives, and we drove past the community center on our way home. Mara identifies super hard with the boxing and the uncertainty about femininity as well as her resemblance to Toni, felt it was more a movie about her than any she'd ever seen. Selah was mostly just into the dancing, but like Mara requested two Toni braids as this week's hairstyle. I'm not so sure how I feel about the actual story, but I love that there's an art film that's so accessible and familiar to my children and me. I felt I knew those streets and hallways even more than something like Carol, which was filmed here and started with a closeup of a distinctive architectural feature that had a lot of us in the audience laughing in recognition. I'd be curious to hear what someone from outside thinks.
90: thanks, I'll try it. I am also garbage, nosflow, but that's not edgy or hip to point out either.
Oh do you work for 4tlassian? I feel foolish now. Sorry!
95 see 64. And I'd already been planning to come into Manhattan for a day of film watching when Trivers posted that he was in town and hankering for a meetup. So don't judge me unless you were at Fresh Salt.
97 It was playing at the Metrograph where I went and about which I'd heard so much, it opened a few months after I'd moved to Arrakis and was very much on my list of places I wanted to visit when I returned on leave. I would have seen it but IIRC it was playing opposite The Hole which is one of my favorite films ever.
I honestly wish I did. The products I do work on are no great shakes either, but I have zero input. No, this was just a fairly heartfelt complaint. Heading into day 2 of this bullshit during the first multi-day round of free time I have had in five years, and knowing it was on some level avoidable, has put me in a shit mood. What principle of agile am I following right now? "Storytelling"?
lk: Examples, examples, examples. Even if every method/function has a perfectly lucid docstring with pre/postconditions, etc., a class without some usage examples up top is like a bag of hammers and nails and picture of a house. Go has a nifty utility (which I've never actually used) to actually run and test your examples so they stay valid: https://blog.golang.org/examples.
I don't judge you negatively, Barry! On the contrary, I am impressed at your filmic endurance.
I suppose those are all pretty different movies, which likely helped.
87: I wish I was in Iceland for the game! Will instead be watching it in a faux British pub where we'll probably be the only Iceland fans.
102: That's a really good point. The examples on the java.lang and java.util classes have been invaluable to me.
We have Tim Peters to thank for doctest and its descendants! See, Python has done the world some good.
103, 104 That's what I used to do every weekend I lived in NYC unless I had family obligations or similar. 3 or 4 films on Saturday and 3 or 4 on Sunday. Sometimes 5 if I could squeeze it in. And almost always one on Fridays and another weeknight or two. I miss it living where I am these days and try to repeat the experience when I'm able.
I won't pretend it's anything like the opportunities in NYC, but dig July 23rd.
109 That is a very good day. And good programming in general. I know that travelling Hou Hsiao-hsien retro came there last year and I see yesterday was "Chimes at Midnight" and "Late Spring". Nice. (Did you stay for the Ozu?)
I saw The Fits! I enjoyed it, but i'm not sure I understood it at all.
(Did you stay for the Ozu?)
I did not—they're playing it twice more later on, though, so I haven't lost my chance.
Thanks, Yawnoc et al. In exchange for this valuable feedback, you're entitled to anything I can pilfer from the office kitchen whenever we both happen to be in Palo Alto.
109 raises the question of whether I feel adolescent enough to see "Until the End of the World - The Director's Cut" at 4:30 today.
My favorite movie in high school. It's insane. Probably worth seeing just for the, uh, primitive search interface with the animated talking bear.
I mean, 300 minutes is a long time to suffer (if one suffers) for a brief vision of the Search Engine of the Future, so maybe not.
Yes yes yes, lk, go see it! It's so delightfully bonkers, plus the soundtrack is so much fun.
Oh my god I'd go in a minute. That film haunted me like few others ever since I saw it on its first theatrical release.
The dream laboratory in Australia comes to mind often when I think about everyone walking around staring at the cellphones. Wenders' version so much more idyllic than the crass reality.
And the search engine bits are great.
I mean, I've only see the regular version. But more Serbs like it would be a certain kind of better.
118 Yes, great soundtrack or greatest soundtrack?
"I'm searching. I'm searching. I find them here I find them there I find them everywhere"
Love it.
Also another one that played in NYC with Wenders introducing it just around the time I left for overseas.
everywhere s/probably/b anywhere.
I'm just worried it would be, like, Wim Wenn-will-it-enders.
That film haunted me like few others ever since I saw it on its first theatrical release.
Me too, although I saw it with a friend at home (and was a literal teenager, at about the midpoint of the kid-to-adult shift in taste). For me Wenders hasn't really aged well and is strictly for sentimental moods, comfort food, etc. But this really might be the day for it.
125 I hear you but there's something about that one that's special.
126 Go for it!
Ok I will. Hooray! Fuck off, JIRA.
I have no idea why "seems" turned into "Serbs" in 120 and should probably just disable autocorrect.
Peep, 111 sounds reasonable to me!
I'm not a film buff at all but I loved The Hole. The Metrograph is a really cool place too and the meal my girlfriend and I had after the show was outstanding. Oh, and the cocktails are very smooth, too.
Also getting to talk to a cinephile before and after the film was super nice. Barry pointed out a lot of things I would not have noticed otherwise, especially about the camera work.
My girlfriend and I went to the Guggenheim today, which was also a blast. I love visiting NYC.
Did you bring a hover board? Because I have an idea.
Looks like I will be too busy to see the film, or anything else. "Agile"!
I actually am looking for (non-hoverboard related) things to do in NYC tonight, with a preference for not having to go too far from the UWS.
I'm very definitely the non-terse programming style. Most of my code is like pseudo-code that has been quickly turned into Python. I rarely use particularly Pythonic syntax and I suspect a lot of things I write with explicit loops or if/then statements could be done quicker with a list comprehension or generator. Not that I never use those, but it's not what I'd reach for by default.
I think that's largely because I'm not a good general purpose programmer, I'm more someone who can write programs to do the sort of things I need to do, which are largely about munging metadata, or writing quick shims between APIs or doing things with images.
I do tend to use quite lengthy and informative docstrings, though. Although I don't generally write doctests.
What's the knock on agile? I don't know any different at this point, and have my own ideas, but I'd like to hear about it.
A lot of it surely has to do with the implementation, although I've heard both "take from agile what works for you" and "ach, that's not true agile" arguments. So I'll focus on the one thing that was absolutely clear to me: it's built around accurate estimations of engineering work. That is in turn based on a fiction that estimation quality improves with repetition. I haven't found that to be the case. Incorrect estimations interact very poorly with frequent deadlines, leading to code debt. Regular, long planning meetings further decrease productivity, and those combined push workers to do whatever they can to square the circle, be it working on a holiday weekend like LK or cutting corners.
It seems specialized for small teams, with small code bases, doing web design. The further away you are from that the worse it will work. We can prove many things about code, but we cannot prove bounds on how long it takes to codebase X into codebase X + feature Y without actually doing it.
Ok, good. That "points" are basically a fiction was my impressionistic knock on it as well. It works on my team because it turns out to be a low-pressure job where if it's not done in this sprint, no problem, we'll just roll it into the next one. I'm more or less proceeding with the heuristic that one point will take me a few hours, three points a day and maybe a bit more, five points, a few days. No complaints so far. Then our "agile coach" said "points are a measure of size, not time" and I thought, go fuck yourself (nothing personal).
If there were hard deadlines to be met each sprint that depended on accurate estimates of the work, then it's hard to see how engineers wouldn't spend most of their time trying to game the system, with everyone becoming demoralized because they're living in bullshit-land.
On the one hand, nobody tries to plot my use of time that way. On the other hand, I'm working right now.
We used person-hours instead of points, which was slightly more grounded but not by much. We did three week sprints for a year and a half on an eight figure project consisting of speculative new development and I'm still burnt out from it over a year later.
I didn't game the system, I just was constantly behind. That's demoralizing as all get out since each sprint I need to think about finishing up last sprint's work as well as whatever (hopefully reduced) load I have for the next sprint. Never mind having project managers who push for over-promising in planning meetings.
Oh, there's that weird issue/epic/whatever sizing problem. No, not every task can be broken down into things that take exactly a day. And if you discover something while working on it that takes more than a day, your schedule is fucked. But that's okay because you've already thrown away a day or two of planning meetings in every two or three weeks to deal with that. Or maybe you should bring that up in the daily standup.
I actually don't mind the daily standup too much, if nobody blathers on. They're probably essential for teams that are entirely remote. They're bad if everyone has to talk.
A co-worker likes to say that agile is for teams that don't know how to talk to each other. It also seems to fuck with anyone who has any social anxiety.
There are people/teams who make it work, but I think they projects are toys (come at me bro) and/or their personalities align well with it.
Anyway, I'm glad that I've never been on that big of a team.
Or not that big of a team for a long period of time. I probably work extensively with a couple dozen people, but only one of them has authority over me and I have authority over no one anymore. Things get tackled ad hoc-ly based on who is screaming/what has to be done to get money.
The team has been larger in the past but right now we're at something like 16-18 developers including two-onsite contractors from India (along with a a half dozen more in India) and four cog sci PhDs, four onsite QA plus additional in India, and a handful of managers. This is big enough that it's hard to get a handle on everything that's going on and if you have a project that cuts across levels of our code base it can be a pain. And our code-base goes back 15+ years across many changes in technology. Just this week I came across a bug that has existed since 2005, along with tests that were expecting the broken behavior.
Our code-base goes back ten years and I'm the only person who can do SAS who has been working on this for more than two years. And I'm not especially good at documenting stuff. Go me.
Actually I rather like agile, much of the time. But this -- That is in turn based on a fiction that estimation quality improves with repetition. I haven't found that to be the case. Incorrect estimations interact very poorly with frequent deadlines -- is really, really apt, and thank you for putting it so clearly.
I'm sure lourdes would have cogent thoughts on agile to share here if he were not vacationing with extended family and participating in two-hour dinners at fine establishments. I received one terse message ("fork in eye"), I assume typed surreptitiously under the table.
If you come to a fork in the eye, take it.
149: Thanks. I've had a lot of disappointment with it. I guess it boils down to it requiring people to be perfect in something impossible to allow them to suck at something fairly easy.
150: Somewhat disappointed that that isn't a furry-themed breastaurant.
I know of no portmanteau that induces more self-loathing than "breastaurant."
I billed for time spent typing a mangled, misapplied Yogi Berra quote.
Wow, Furr's Cafeteria. Now there's a throwback to my childhood.
We used to go to the one in Farmington a lot when we were visiting family friends there. At some point we switched to Golden Corral. We never went to the one in Albuquerque, and until checking the link in 150 I wasn't even sure there was one (and I'm still not sure how long it's been there). Albuquerque has a much wider variety of middlebrow chain restaurants than Farmington, so we generally went to better ones than Furr's.
I wish I had like 200 bottle rockets, a small piece of copper pipe, and a zippo.
You realize the NSA is probably listening in on this, right?
Somebody was lighting firecrackers and I couldn't celebrate freedom back at them because all we have is sparklers, which could melt through a car but are apparently safe compared to firecracker because liberals hate freedom.
It's Independence Day here. Soon it will be your turn to be free.
I guess I could just shoot into the air. How long does shotgun ammunition last without spoiling?
Just be sure not to shoot straight up.
There's a steep hill behind the house. I was just going to fire into that. Might kill the poison oak.
157: Anyone else in your neighborhood making homemade devices? Because watch your step. Money shot of that blasted foot looking, uh, not quite right.
re: Agile
We don't really use it, instead we have more of a 'kanban' style approach on our larger teams. There'll be project boards that tasks/feature migrate across, and take however long they take.
It's still fairly 'agile' in the sense of not being 'waterfall' with a ton of upfront detailed planning, but the staff just pull work at whatever rate they can get through it, and the boards (which are just Trello boards, rather than something physical) let everyone keep an eye on where things are. The larger projects have a manager who is maybe a bit more prescriptive about what people are doing than I am, and who maintains a higher level project board.
For my team, which is smaller, I just tend to give people broad tasks to work on: usually starting by outlining a broad problem area,* and pointing them at places they can do research, or documentation or code that solved a similar problem in the past. I then expect them to iterate around working out what it is they need to be doing by asking me, and over a day or two we'll refine that down into an informal workplan and some key tasks. Everyone maintains their own boards that I can check in on for progress, but generally I just ask them every few days. So regular informal meetings, but no format 'stand up' process at a set time. That works very well for the people who have a strong work ethic. I have a couple of people who are super-productive and who I trust to just get on with things and to seek me out and ask questions whenever they are blocked or going slowly, and my team gets a lot done. It works pretty poorly for people who are lazy shites.
* e.g. 'we need a worker that can pull jobs from a queue, and process the images and metadata into X format and Y schema.' or
'we need some way of triggering updates of system A whenever an event of type X happens on system B'
I hated the last half of "Until the End of the World" so much. A friend of mine and I would quote "It's dead? I'm dead!" at each other for years. Though the way people using cell phones has turned out rather closer to the technology in the movie than I would have expected.
166: yes, I saw that. Someone is laying landmines in Central Park now? Good grief. Stay on the metalled paths, New York Unfoggeders, and remember your fives and twenties.
Link fail. Try here http://info.publicintelligence.net/counter-ied-smart-book.pdf
||
Farage out too? Too fucking late. (I guess he's staying an MEP.)
|>
Gee, thanks, officer saying If he was going to harm people, he wouldn't have put it far off the path. They also would have put some nails or ball bearings in it.
167: That sounds lovely. I don't mind some Agile-y things, but the sum is worse than its parts.
As someone who alternates between an amazing work ethic and burnt-out laziness, I can appreciate the occasional active managerial hand.
No one in the history of software has ever hand-documented this many fucking bugs in a single weekend, in a carefully curated list sorted by product component. I am actually afraid that when I get to work tomorrow my colleagues are going to explain in mild horror that I wasn't supposed to do this, because how can it be morally and metaphysically possible that anyone should be assigned such a stupid task? I HAVE A FUCKING PHD. No, true, we all love to pretend it's not worth much, or that it's a certification of stupidity or innumeracy or what have you, but JESUS CHRIST COME ON. COME. ON.
I should put a ringer in this list. What should it be?
"After a night of unsettling dreams, a user found himself transformed in his bed into a monstrous vermin. (19035)"
Not that I wish to portray myself as intelligent or especially numerate. I am neither. But even idiots can be frustrated.
Even for me, this is probably way over the line of reasonable self-disclosure and appropriate behavior in a public forum. Whee.
Nah, it's fine. Unfogged is a great forum for venting about stupid bullshit like this.
I just learned that I could have gone up to the Vancouver Jazz Festival this weekend. But aargh the longer I type things here the longer it takes to put this nonsense behind me. I was so sure, so sure, it would take about six or seven hours total.
Complain all you need. That sounds so awful, but it's in the past.
Funny that I'm on the other side of PhD-having and I still equate it as usually a marker of smart numerate people. Grass, other side, etc.
176 sounds like a bug report from Clock/work Emp/ires or perhaps this twitter account.
Are you still job-hunting, teo?
183: Yes, although I haven't had much luck so far so I'm thinking I'll probably need to stick with my current job for the near future.
It's vaguely remembered Kafka and the Metamorphosis. (Unlike many here, I don't have a memory full of literary quotes... just not how I relate to books, I guess?) And I am still fucking working. I literally don't know how I'm going to get to the end. I am the only writer in this time zone; my colleague, who normally could have stepped in to help, is out due to a mixture of maternity leave and visa issues until October. I think they are finally attempting to hire a contractor to alleviate the pain. It's fine to have a baby and unfortunate to have visa issues; I shouldn't complain about this. But I have filled in for this colleague for almost nine months for various reasons, for no extra pay, and she has in turn covered for me for one (1) week.
Sorry, that's inaccurate: for four of those months I was the contractor who explicitly filled in for her, not a person trying to do two jobs. The rest has been donation.
Whenever she comes back, tell her you need to take five months off and ask if she can cover for you. No need to tell management.
When she comes back I may be giving notice, tbh.
I love it when one of those comes together.
Especially when that plan means Audrey Hepburn leaves Jed Clampett for me.
If NASA is so great, how come they haven't found proof of life on other planets yet?
Or Reptilians. Hard to say which is the driving force.
I have proof of life on other planets, but it won't fit in the comment box.
Will it fit in a budget line?
I always use Avis because they had a location right near my parents.
I usually use Budget because they have the state contract and I mostly travel for work.
I rarely travel places where I need to rent cars, though.
I definitely never travel to Jupiter.
And now, a question for teo: people have taken to calling you 'Clarkier Kent'. How do you respond to allegations that you were, in fact, born on Jupiter?
dalriata's 114 was the best summary of why agile mostly sucks that I've seen. Thanks!
Part of the problem is that we've run out of Pu238, which makes Jupiter missions tricky (Juno has *enormous* solar panels) and Saturn missions impossible. It's possible that Enceladus is just spewing bacteria into space and all we need to do is spend the $700M to go and grab some.
204: All lies! Also, there are much Clarkier Kents than me!