tag:blogger.com,1999:blog-6248043124025283718.post5512901278974804475..comments2024-03-07T00:57:28.278-05:00Comments on Tableau Friction: Reconsidering previous IFNULL postChris Gerrardhttp://www.blogger.com/profile/01598731155784487000noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-6248043124025283718.post-88863161743930046112012-10-03T22:32:09.127-04:002012-10-03T22:32:09.127-04:00Thanks, Joe. I'd seen this by Bret Victor: htt...Thanks, Joe. I'd seen this by Bret Victor: https://vimeo.com/36579366 - it's Bret "Victor - Inventing on Principle"<br /><br />I very much like his ideas about surfacing the effects to make comprehension easier. It's very much, I think, in the spirit of Tableau's providing a way for people to visualize their data without needing to know anything about the arcane programmatic/technical aspects of the "how" of it's getting done. In essence, one says to Tableau "sort across by this, down by this, and show me the magnitude of this" and Tableau provides a high quality visualization of just that.<br /><br />I've brought this up before, and at the risk of being a Johnny one-note, here's some pseudo code that does (or should) the same thing:<br /> with Employee data<br /> sum Bonus <br /> by Employee {top-down}<br /> across Department {left-right across)<br />Is it VizQL? I expect not, although I've never seen actual VizQL<br /><br />How about this:<br /> Table file Employee<br /> sum Bonus <br /> by Employee <br /> across Department<br /> END <br />It's pretty much exactly the same thing, and has the great benefit that, if it's presented to FOCUS it will create exactly what it says it will. And it's been around for appx 40 years.<br /><br />Another though on Bret Victor's take on things. One of the great benefits of learning programming with mainframes, punch cards, FORTRAN, and COBOL in the way back is that, because machine time was so expensive, one had to learn how to hand-work one's algorithms before being allowed to submit the card deck for processing. In a very real sense it was related to Bret's illustrating the effects of code in operation as a way of assisting people who don't already understand it to gain that understanding. <br /><br />I learned programming this way in the mid-1970s at the University of Guelph - it was hard, mostly because it was tedious and I was impatient. But I did learn to think like a problem-solving, algorithmic, methodical computing machine.<br /><br />Although I've been a programmer for almost 40 years, and enjoy it, I'm more interested in the outcomes than the process. Anything that gets in the way of seeing the clear path to what I'm trying to achieve is frustrating, particularly when whatever's obstructing the view needn't be there. And it's doubly frustrating when the answer to something not being human-clear is "well that's the programming convention so it's right".Chris Gerrardhttps://www.blogger.com/profile/01598731155784487000noreply@blogger.comtag:blogger.com,1999:blog-6248043124025283718.post-49001037400485242592012-10-02T12:20:05.397-04:002012-10-02T12:20:05.397-04:00I think you would like this:
http://worrydream.com...I think you would like this:<br /><a href="http://worrydream.com/LearnableProgramming/" rel="nofollow">http://worrydream.com/LearnableProgramming/</a><br />I believe the section on Flow applies to view you have raised here.<br /><br />What you are describing is a barrier to learning, and once the barrier is crossed it is no longer an issue. Getting past the barrier is difficult. Does this article address the need you have?Joe Makohttps://www.blogger.com/profile/15643500270169278424noreply@blogger.comtag:blogger.com,1999:blog-6248043124025283718.post-33204325146847060932012-09-30T16:14:30.732-04:002012-09-30T16:14:30.732-04:00Hi Joe and Robert,
My point here is that the curr...Hi Joe and Robert,<br /><br />My point here is that the current formulation of IFNULL is not as simple and clear as it should be, so that ordinary non-technical people have as low a barrier as possible in achieving the result they're after, which is to obtain one value for their calculated field when an expression is null, and another when it's NOT NULL.<br /><br />I know that it's an almost invisible difference to people who know this stuff, and that it's possible to achieve the desired functionality with other means.<br /><br />But that's not the point. Tableau was designed so that regular people would need absolutely minimal technical skills, either by having them or by getting help from others who do, to be able to analyze, visualize, and understand their data.<br /><br />I'm pretty much inoculated against arguments that use technical framings to rationalize Tableau's friction points.<br /><br />It's perfectly OK that MySQL's IFNULL function is the same as Tableau's... for MySQL and the people who use it, but they're not same audience as Tableau's.<br /><br />Whether or not the current formulation has back end SQL query advantages is a moot point. It's Tableau's job to shield the user from the back end technical aspects of data source access efficiencies as much as possible, not force the User to accommodate to the needs of the machinery.Chris Gerrardhttps://www.blogger.com/profile/01598731155784487000noreply@blogger.comtag:blogger.com,1999:blog-6248043124025283718.post-58878359984603326822012-09-29T22:21:53.945-04:002012-09-29T22:21:53.945-04:00Hi Chris,
Are you familiar with IIF()? Your propo...Hi Chris,<br /><br />Are you familiar with IIF()? Your proposed expression could be written as:<br /><br />IIF(ISNULL(expr1),expr2,expr3)<br /><br />This is nearly as compact as your proposed form. It's also important to note that IFNULL() can be useful for avoiding a repeated subexpression. This may not be much of a cognitive burden, especially if you are referencing a calculated field, but the full subexpression will appear in multiple places in the SQL query that Tableau has to generate. For databases with poor query optimizers this may result in worse performance than the simple IFNULL form that Tableau already supports.<br /><br />-RobertRobert Mortonhttp://www.tableausoftware.comnoreply@blogger.comtag:blogger.com,1999:blog-6248043124025283718.post-14805505692497024432012-09-29T22:19:52.387-04:002012-09-29T22:19:52.387-04:00I disagree with your preference.
2. makes perfect...I disagree with your preference.<br /><br />2. makes perfect sense and aligns well with your "new IFNULL" at the beginning of this post, with expr3 being expr1.<br /><br />I read the current IFNULL(expr1,expr2) as:<br />When expr1 is null return expr2 otherwise expr1<br /><br />I see this as the same as your "new IFNULL".<br /><br />and the current function aligns well with this, it is shorthand, and makes sense. I fail to see any leapfrogging or how this is unclear.<br /><br />If I wanted the extra logic to return something else when expr1 is not null, your expr3, then I would write out the full IF/ELSE statement like you did, and not use the shorthand IFNULL().<br /><br />I guess if someone has difficulty understanding this, then they are more than welcome to write the full logical statement out, IFNULL() is just a shortcut, shorthand for a frequently used logical setup. Just like ZN().<br /><br />Also IFNULL() is a SQL function, and Tableau is exposing it in the calculated field editor.<br /><br />Tableau documentation matches MySQL documentation: http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.htmlJoe Makohttps://www.blogger.com/profile/15643500270169278424noreply@blogger.com