A pragmatic toolchain
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Subtitle |
| |
Title of Series | ||
Part Number | 2 | |
Number of Parts | 33 | |
Author | ||
License | CC Attribution 3.0 Unported: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/30775 (DOI) | |
Publisher | ||
Release Date | ||
Language | ||
Production Place | Cork, Ireland |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
1
2
4
7
8
12
17
18
19
20
24
28
30
00:00
Programmer (hardware)Information technology consultingTerm (mathematics)AuthorizationProgram slicingSlide ruleDesign by contractGoodness of fitIndependence (probability theory)Lecture/Conference
00:30
Programmer (hardware)Multiplication signBitType theoryNumberEnterprise architectureMereologyFile formatChainDemo (music)AuthorizationRight angleDocument Type DefinitionScripting languageEmailComputer programmingEndliche ModelltheorieGodAdventure gameFormal languageGroup actionInformation technology consultingProcess (computing)Revision controlProbability density functionRoundness (object)Different (Kate Ryan album)RoutingLetterpress printingRule of inferenceSystem callComputer-assisted translationQuicksortPoint (geometry)Normal (geometry)Wave packetContext awarenessVariable (mathematics)Cellular automatonInformationProgramming languageTerm (mathematics)Source code1 (number)WebsiteFigurate numberMarkup languageFitness functionConnected spaceCodeEncryptionPhysical systemComputer animation
07:58
Computer fileAuthorizationMultiplication signMathematical analysisPlotterSource codeComputer animation
08:46
Type theoryPhysical systemScripting languageAuthorizationIntegrated development environmentBuildingVirtual machineMacOS XOpen sourceWindowPreprocessorQuicksortSpacetimeProcess (computing)Source codeJSON
09:30
Function (mathematics)Multiplication signPreprocessorProcess (computing)CodeGraph coloringSource codeComputer animation
10:21
Process (computing)TouchscreenRevision controlMoment (mathematics)Medical imagingCrash (computing)Graph coloringSource codeJSON
11:01
outputProgrammer (hardware)Computer fileDifferent (Kate Ryan album)CodeSource codeFile formatData conversionDirectory serviceE-bookAuthorizationSheaf (mathematics)MereologyGraph coloringSpacetimeStaff (military)BitRight angleHyperlinkRevision controlProduct (business)Multiplication signMathematicsProbability density functionSelf-organizationFluxDocument Type DefinitionUniform resource locatorRoutingSocial class
13:47
Multiplication signChainElectronic mailing listFood energyMereologyComputer fontIdeal (ethics)EmailGoodness of fitComputer programmingProbability density functionE-bookComputer fileRight angleResultantFile formatCASE <Informatik>Type theorySet (mathematics)Rule of inferenceFlow separationMaxima and minimaNeuroinformatikInternet service providerPlanningQuicksortCuboidHypermediaGroup action1 (number)Electronic visual displayObservational studyStreaming mediaState of matter4 (number)PressureDifferent (Kate Ryan album)Point (geometry)FrequencyoutputNumberSinc functionMarginal distributionSimilarity (geometry)Control flowExtension (kinesiology)Programmer (hardware)Web pageTerm (mathematics)Touchscreen2 (number)Category of beingStatement (computer science)Function (mathematics)Online helpLevel (video gaming)Letterpress printingUniform resource locatorCodeAreaForm (programming)Macro (computer science)Decision theoryMathematical optimizationRootMessage passingAuthorizationComputer simulationSource codeComputer animation
Transcript: English(auto-generated)
00:01
All right, good morning, I'm Steve Peter as this slide says This morning. I'm here representing the pragmatic programmers. I'm not technically an employee but an independent Consultant or contract or whatever term you want to use which has all the joys that you might think that entails
00:21
Like two minutes before I left for the airport to come here I had all kinds of questions to from authors to Answer and say no, I'm going away for a week. Sorry folks So who are the pragmatic programmers sounds like the beginning of Mythbusters here?
00:42
Pragmatic programmers came about when two programmers Andy Hunt and Dave Thomas Was not the founder of Wendy's to the different Dave Thomas Both of them were programmers working out in industry for years and years Andy worked at AT&T
01:00
Dave worked for AT&T at one point in different groups But they got together and started comparing notes and realized that Every time they got called to a consulting job that they were solving the same problem over and over again And they decided that they would try to put their knowledge into a book
01:22
Which they did and they called it the pragmatic programmer They still got called to do the same thing over and over again because people weren't reading the book and following the advice But if you haven't read the book and you do programming I do recommend it is very good book The part about it that I like best when I first read it was they talk about
01:45
Documenting your work and if you're going to document it You might as well make it look good and there's a system out there called tech and you should use it When I read through that I thought I like these guys A couple years after they wrote the pragmatic programmer
02:01
they both discovered the Ruby programming language and Immediately fell in love with it and said that it reflected exactly the way they thought about problems that there was no need to Conceptualize how they might solve it and then translate that into some programming language and then implement it that they just sort of
02:22
Thought directly in Ruby and they could do it. So they Ruby was created by a Japanese programmer and at the time all the documentation was in Japanese So the two of them sat down and went through all the source code and wrote the book called Programming Ruby, which is now in the third edition
02:42
That details the language how to program it We use a lot of Ruby at the pragmatic programmers as you might expect I can't say that my mind works exactly like Ruby. I'm forced to after I think about it much
03:00
Realize that that the way my mind work is actually more like pearl which is sort of this mishmash and It works great at one point and then you go back to figure out what you did six months later You can't figure it out Unfortunately, that is the way my mind works, but I am a linguist by training and Larry walls a linguist. So
03:22
After these two books came out They were very popular books and Andy and Dave being pragmatic Decided to buy back the rights to the book The books and start their own publishing enterprise that they called the pragmatic bookshelf
03:41
If you haven't read any of the pragmatic books, I urge you at least to go to our website I would show it to you now if I had connectivity But I don't And I would show you pictures of some of these if I had it when I was writing this last night but I didn't so you'll just have to go with the Brown and brown black and white
04:02
But go and look at the website or pick up some of our books I don't get any extra money if a lot these books sell well but I do enjoy typesetting a Number of years after they started working on this enterprise I should back up and say the pragmatic programmer
04:21
They typeset themselves It started out as both of them had been at AT&T or at least Andy was at the time the original pragmatic programmer was written in T-Rough and As it grew a little bit larger They started having some issues with it and then took it to the publisher and the publisher said
04:42
We don't really like the way this looks Have you considered using this thing called tech? Our designer knows tech and can come up with something and created a layout for them in tech that they've done used And when they started the pragmatic bookshelf, they took that with them and started enhancing that toolchain
05:03
That's part of my problem these days is that I inherited that toolchain that started years and years and years ago And we heard in the first talk about legacy Code and what do you do with these legacy formats? That's something that I face all the time But anyway a couple of years after they started this I got an email
05:25
Say from Andy saying hey, we need somebody with some tech experience and who knows XSLT. Can you help us out? So I got in my car drove to the bookstore and bought a book on XSLT Yeah, I can do this
05:44
And thus began my adventure with them that Continues to this day We'll go into that What toolchain do we use? We use a bunch of things
06:01
All of our source code that the authors write is in XML. It's in our own DTD called pragmatic markup language or PML We use Unix tools like make We use lots of Ruby. Although we do have a few scripts in other languages
06:20
We've got a couple pearl scripts in a couple Python scripts no luau yet, but We'll probably be adding that at some point. We use XSLT, which I've now come to know and I Don't know if I love it, but I Deal with it. We use tech and we use PDF that we get through a couple different routes
06:45
All of the books that we sell We sell in either print versions or as PDF versions and they get two different routes to PDF Depending on which one we use our print versions ultimately go through acrobat
07:02
Because of the requirements of our printers They throw hissy fits every time we try to do something different. So we generally take the last step through acrobat But the ones that we sell as PDF online Those go through the normal DVI. I shouldn't say the normal anymore
07:23
DVI PS and then PS to PDF The books that we sell as PDFs aren't digitally rights managed we do have Certain information that's encoded into the PDF and that's why we do that the last automated step in there
07:42
But there's no no big Encryption that goes on but that's one reason why we have to stick somewhat to the tool chain that we have Now, let me show you a demo of what we have here
08:01
All right, here is a typical file that an author might have But you can see here what a typical PML file looks like
08:26
Looks like fairly stock XML And then you can see there why I haven't been writing any books on tech recently I've got hard swaggled into doing this book here. This has been occupying my time recently
08:43
but we take the XML and The nice thing about this with using these mainly open source tools is that all of our authors can download this This build system works brilliantly on any UNIX based system So it works wonderfully on Linux on Mac OS X
09:02
It can work on Windows, but you really have to bend over backwards It's much better if you're using some sort of you know, Cygwin type environment Which is essentially then running UNIX on your Windows machine But it works well on UNIX based systems
09:21
So when I get ready to build a book All I do is type make all Of course goes through Pre-processes with a bunch of scripts and then runs tech Runs bib tech and then runs tech another two times to resolve everything And you can see here it's running DBI PS and PS to PDF and bingo we get output
09:46
Which looks something like this Now our pre-processing we use for coloring code. Let me get you some code here
10:07
Anything exciting But you can see here that the keywords in code are always colored we can also
10:20
By throwing a different switch in the make process By adding in a switch to the make process we can make a screen version of this
10:42
Just the spinning beach ball and then crash and that's a dummy color that I'm served there
11:16
But here's what our PDF versions look like So they're colored for they've got hyperlinks here so you can go directly to a section
11:26
the URLs work if we were online and You can see down here You see here our code is colored literally, right?
11:53
Our source is generally Organized into two different directories a book directory and a PP stuff pragmatic programmer stuff directory
12:04
The authors generally work out of the book directory. I Do most of my stuff in two directories in the PP stuff We have a tech directory That has all of our fun stuff in it Most of this stuff that I'm modifying comes out of our style sheets
12:26
Which is called Prague Prague dot style So that's where I spend most of my time making tech changes, I won't really show you anything there It's it's fairly standard. We use memoir As our class file, but it's fairly standard tech. There's nothing earth-shaking there
12:45
Our XML comes out of our DTD and then we've got different Formats that we can create from that XML So we can go to an HTML That's useful for some ebooks that are coming out that require HTML is their input file
13:02
We go to LaTeX. That's the one that I do most of my maintenance on and then we have a couple of different ebook formats The ebook space right now is is in flux But it's becoming much more important to us I'll go in a little bit present one of our problems that has to do with ebooks
13:24
But generally we're trying to keep one of the two principles of the pragmatic programmers is very keen in keeping our XML as the canonical source Of all of our books that we can do then do the conversion on With tech being the main route that we're using right now, but we don't have to keep that in the future
13:44
So, what are some of the issues that we have using this toolchain Like I say one thing to remember before I present the issues because there are
14:05
Solutions that you can immediately see to some of these issues if we abandon the XML as the canonical source But my hands are tied in this I can't really abandon that The first problem we're having is with hyper refs in general
14:22
And until recently our URLs have been a pain I think knock on simulated woodgrain finish That I have solved that problem But it does keep popping up that the URLs aren't breaking properly that sometimes In the sidebars and if people read the the book in acrobat
14:43
The sidebars end up with tech code in them that then display And they say hey, what is this? Vbox stuff that's sitting here. I can click on it. I get to something but it's hard to get rid of But right now our biggest problem is with ebooks and reflowable PDF
15:07
Reflowable PDF means that you can change the size of your margins and the PDF will flow reflow Automatically as opposed to them having to pan back and forth at this point We're getting at least an email a day asking us when we're going to support all these different ebook formats like Kindle and various other ones
15:28
It's increasing in frequency and I'm getting a lot of pressure to be able to produce reflowable PDFs. I can't do that right now with stock tech and I need a solution and I'm hoping that the
15:42
Collective brilliance in this room will provide me with a solution by the time I get on the plane If not by the time I walk out the door this morning So what can we use? Is luatech gonna provide a solution?
16:02
Is zetech gonna provide a solution? Is zeluatech gonna provide a solution? Okay, we've got a solution
16:23
Do it fully reflowable then you can change it in all ways. You just make several copies with different size screens And when they change the size you actually allow them to stick to the next grid level and substitute the copy you want
16:41
But a lot of ebook formats aren't going to allow me to input several different Like if I put into say Kindle, it won't allow me to put in multiple inputs I need to look how people format the user area. I think it's possible to do it. All right, if we can do that great
17:01
So these are kind of engine form engine problems then there's a question of what format we can then use and That kind of ties in it's it's orthogonal, but it's related We can use basically anything and you know Even eplane is fine because I'm really the only one who has to deal with the tech
17:20
Aspect of it until very recently Dave dealt a lot with the the tech But Dave's spending most of his time these days riding Ruby on rails And I'd rather him do that than me have to do that And I'd rather do the tech Do we do some new format that's not any of these that then incorporates this
17:42
Now the carrot to place in front of this group that's in front of me there with these different formats and different engines We can provide some funding to do some of this It would be in dollars which I realize is funny money these days
18:03
But if need be we can come up with euros or ruble or gracma or whatever we want Monopoly money works well, too And if we can't get satisfaction out of this We may have to switch away from tech
18:23
We do know that XSL-FO as much as it pains me does work and does produce reflowable PDF and Since we've already got part of XML in our toolchain It can be done. It doesn't look as good as tech
18:43
But if we could get ebooks out of it We may have to use tech for our print and on-screen PDF and then use XSL-FO To do the the reflowable ebook formats. I prefer not to do that
19:01
So maybe that might be an additional inducement, you know, please help us keep tech in this But that's basically what I want to present to you Are there any questions and hopefully are there solutions we've got another solution
19:32
Right, we don't actually beyond we've got a few things that we offer for Emacs users and for
19:43
Textmate users, we've got some macros in there to help them out But we generally let the author use whatever they want to type in the XML I use I go back and forth between Emacs and Textmate when I'm authoring depending on what I'm doing
20:07
That XSLT I Think it's the Xerxes Xerxes, I think that's what we're using. I Rarely get into it. I just sort of I do my XSL
20:24
Format and then just run it through but I think we're using Xerxes To generate
20:43
Well, because some of the ebook formats require some do take HTML as input and those were fine on Yeah, but some take PDF and some Don't you know, there's no there's no aspect ratio. It depends on what the user sets
21:05
So that has to be reflowable
21:24
Yeah, but that doesn't solve the problem if somebody is using a mobile phone and then wants to change the headset You need to reflow so you don't have to scroll Yeah, I mean it's it's gonna look
21:59
I Mean that but that's but that's the the general ebook problem
22:04
You know that that I can't really solve as a book designer But that I can't throw this strictly to the support department because they're gonna get tons of emails every day saying hey I spent $30 on this this ebook and it looks like crap on my reader
22:57
You just make the other half Would almost certainly be a lot easier
23:01
right there be a close relationship between what we're doing here and what we're doing that and Whilst this doesn't help you because the answer I'm giving is if I wants to do that. I want to start from here We have had an enormous missed opportunity over the past 20 years in that we have not
23:22
Packaged tech or an extension of tech in such a way that it can be used for example as a reflow engine So this problem is actually of our own making because we have not addressed the issue of packing Set for an extension of time so that you can be used to this
23:41
We've missed opportunity There's no saying that every problem has an opportunity in it Here's the problem, and I think there's the opportunity in it, which is one that we miss Now I do have a question Which is there's clearly a lot of interest in what you're doing And you're bringing in Fresh and interesting problems coming from real opportunities out there
24:06
Would you like to organise a session where the people who have a strong interest in this can get together? Sure, yeah How do we do that? I think we'll work on that here in a break Alright
24:22
You said that you were producing your PDFs, do you think that you're doing PDFs? Right Do you consider it to be PDF type? Yes, the reason why as of right now we're still doing it this way is because The original pragmatic programmer and the original programming Ruby rely heavily on PS tricks for certain things that are on the page
24:45
And every time I suggest that we get away from that There's strong interest in it, and then the very next book somebody says Oh, I want to do that, and I really haven't had the time yet To re-implement all the stuff that we're currently using with PS tricks into something that I can use with PDF tech
25:05
But yes, I would like to get away from that Right, yeah I agree
25:24
Yes, we have some that can do it The first one is the solution Yes You said that my question is
25:43
Is that a sort of purely religious statement or are there practical reasons? Well, there's aesthetic reasons XSLFO produces wonderful reflowable PDF, it just doesn't look as good as tech And I, coming from That's the property of reflowable PDFs
26:04
No, because I can take XSLFO and produce a non-reflowable PDF that looks similar but not quite as good as the tech output Which is so much the same as I'm suggesting, but to have it reflowable you're not going to get the type of graphic quality
26:23
Probably So that's something to do with what, I mean, renewable, reflowable PDF is a clutch basically I mean, those are the decisions now that I know you can have it stopped Right No, it wasn't that I got it stopped Yeah, and part of it too is pure laziness on my part in that you saw the number of XSLT files I had to have already
26:46
And I would much rather be able to just maintain the PPB to LaTeX file and get everything in there And actually, unfortunately that's what I spend most of my time doing And now if I have to maintain an HTML because the Kindle stuff comes off of HTML
27:05
Has anybody used Kindle here? It's utterly unusable for programming books Kindle provides you with two fonts, a sans-serif and a serif There's no fix-with font So you can't do code listings
27:21
And it converts everything to black and white So any screenshots you show get pixelated beyond belief I can show you some horrible shots of, we tried to produce one book through just to see what it would look like And it, I mean, it practically turned my stomach
27:41
But one of our other non-technical members of the team said, eh, you guys are too picky, it looks fine to me So that may be the case that I'm too much of an aesthete to be able to do that So to be off the back end of text, would that solve your problem?
28:10
Sure, I don't know how you would do that though Now the second question is, could you do any better than that? In terms of quality of the output
28:21
In other words, does the optimum root pass through XSLFO in terms of the quality of the output? I don't know, I don't know I would have to try and see what came out Yes, yes
28:51
The reason why it wasn't at last years tech conference was that I was in Moscow for several months
29:01
And I brought a bunch of books with me on my computer to read So I spent a lot of time reading on my computer And I guess maybe I'm just too old, but I agree with you, I don't find it an enjoyable experience I much prefer having, you know, yeah, yeah
29:31
And with my eyes I always have to have it blown up extremely big Yeah, but I don't enjoy it, but the young folks seem to enjoy doing it
29:43
I do know plenty of people who have read tons of books on their cell phone I can't do it I mean I read, when I had my old, what was it, it was a palm I guess at the time I read Zane Grey on it And that's the only thing I've ever been able to do was, you know, something light like that I could handle
30:03
But anything more technical, it just gets to be a nightmare And especially if you've got a programming book or something like a Photoshop book Where you've got to have screenshots in there Once you get these little screens it's impossible I am a fogey I guess is what it comes down to
30:24
Alright