EMx 021: “Dialyzer Pretty Printing” with Andrew Summers

Elixir Mix - Un pódcast de Charles M Wood - Miercoles

Panel: - Charles Max Wood- Mark Eriksen- Eric Berry Special Guest: https://twitter.com/chris_mccord?lang=en In this episode of Elixir Mix, the panel talks to Andrew Summers who lives in Chicago, currently. Working on Elixir development, and here to talk about how he wrote the dialyzer pretty printer. He is a software engineer for Albert.io, makes cool stuff every day, loves punk music, and Philadelphia sports. The panel talks about the Dialyzer pretty printing, Elixir, code writing, and more! Show Topics: 1:07 – Why are you famous? 1:11 – Andrew: Answers the question. 1:34 – Chuck: Nice. Is the dialyzer printer complete pretty printing or is it more than that? 1:45 – Andrew talks. He mentions the background information on this specific printer, which was written a decade ago. 4:13 – Panel: One thing that is helpful is that it is a static code analysis. In the Elixir we are writing these spec statements. For nothing else than this type is coming out. Then this looks at the code, and your spec says you are returning this, but I can tell that you are also returning X, Y, or Z. So it is helping us see what we are declaring a code to do, and that’s really what the code is doing. 5:28 – Guest: Yes, exactly. To continue that topic here is what else it’s saying... 6:08 – Panel: Our panelist is not here, but he has had to fix code before with that problem. With Dialect Dialyzer – how do we say this library is out-of-date? The code is out-of-date. How do I get my stuff to pass – to clean up my site? 6:54 – Guest: Containing that warning. Guest goes into further detail how to problem-solve this issue. 8:02 – Panel: So you are saying that I can funnel. 8:20 – Panel & Guest go back-and-forth talking about this topic. 9:49 – Panel: I am still diving into the system. Haven’t really used the printer, yet. Panelist asks Guest a question. 10:04 – Guest: At the forefront there are some configurations to help with that. 11:16 – Panel: Why would someone not want to use this? What are the cons? 11:23 – Guest: It would have to do more with CI than anything (one con). 13:06 – Panel: Lots of people are coming to Elixir New. Great. What is the selling point? Why should someone invest his or her time in this project? 13:33 – Guest: I find looking for a type spec is one more piece of information that could help the reader that would tell them what the code should be doing. Any information from the original author to be passed down is great. Having the machine to check that, whenever you push code, it’s an imperfect check (as we were saying). If it can tell you that you did something wrong, then why not? It gives you that extra red flag. There are huge benefits to that. Same reason we write unit tests. 15:20 – Panel: You are learning Elixir right, Chuck? Panelist talks about tech specs, code writing, and learning projects. 16:25 – Panel: Here is a tip to learning. One thing that I did I came to an existing project and writing a sub-system ( as series of modules) Writing the tech specs. As they are interacting with each other, then writing Dial Elixir, and grab the output to the file path to where my code is. Within my own code find where I am inconsistent. Andrew – you could get pages of output, right? Any tips for users? 17:37 – Guest: Isolate portions of your code base. 19:27 – Chuck: I do like the idea of the umbrella. Phoenix app out into an umbrella. A sub apps and they are more centered, smaller sized. Then, yeah. Start with Dialyzer on just that project. Isolate it, and this app in the umbrella. The output is much smaller, and good success with that. Now, one of the new features you added was the language / the code that it reports is an ERLANG term. That is not familiar to most Elixir developers. Especially if you are new to it. If you are turning this into a friendly Elixir thing, then you had to learn other programs....

Visit the podcast's native language site