On February 27 and 28, we are giving you a chance to ask questions of PragProg author Ashley Peacock as part of our Winter Literary Festival in partnership with codebar.
Ashley Peacock is the author of Creating Software with Modern Diagramming Techniques and Serverless Apps on Cloudflare. He has experience across the tech stack and has worked as a staff engineer and architect in the UK tech industry for over a decade. Ask him about programming, one of the technologies he has written about, or anything else—really!
Everyone commenting or asking a question will automatically be entered into a drawing to win one of the author’s books.
In addition, from February 24 to March 2, as part of our Winter Literary Festival with codebar, you can use promo code 2025WinterFest to save 40 percent on purchases at pragprog.com. We’ll donate 20 percent of the net income from the promotion back to codebar after the event.
Offer not valid where prohibited or restricted. Offer not valid on previous purchases. The Pragmatic Programmer: 20th Anniversary Edition is not eligible for discounts, as we do not publish it.
Hit Reply to post your question below. The author will check in periodically to answer your questions.
After watching your author spotlight, I’m almost convinced to move my website to Cloudflare since hosting a basic static website is free with Cloudflare Pages. My only hesitation is that I have limited technical skills. Do you think it’s a reasonable project for an English major with basic HMTL and CSS skills to use something like Hugo to build a new site and deploy it to Cloudflare?
Hi Margaret (and everyone else!), I’m Ashley and ask any questions you have about Cloudflare, diagramming or even just a general software engineering/career question and I’ll be more than happy to dive in!
To your question, absolutely. Cloudflare Pages has Git integration, so you can literally setup a GitHub repository, link it to your free Cloudflare account, and it will automatically deploy to Pages when you merge - you can use just static HTML, or a simple framework like Hugo, or something more involved (Next.js, Astro) and as long as you configure the build command correct for the given framework, it’ll all just work.
And as a bonus, it’ll be completely free to host something like a Hugo site, as static assets served via Cloudflare (static HTML, images, CSS, JS etc.) are free. You’ll only pay if you generate dynamic content, so things like Next.js server-side routes.
I think I’m being particularly drawn to serverless following your last spotlight AMA. I still have a few questions on that and software architecture so here goes:
I’ve checked out Cloudflare pages and their offer is amazing, almost too good to be true. If you were running an agency and wanted to offer new customers new websites, but they were fearful of web hosting charges would you recommend Cloudflare pages as an alternative?
Have you heard of any businesses or web design agencies piggy backing off Cloudflare’s serverless options and getting away with it by staying within the limits. If not, if you were to try it, do you think you would you be able to pull it off without destroying your wallet? Any pros and cons of doing so?
Finally an architectural question based on your other book. I came across the C4 model by accident last year while doing a random Google search. I think it’s great for system design better than anything else I’ve come across so far? So how often do you use it as an individual and as a professional? Have you seen or run into companies using it? And if so, what type of companies?
I know this is a lot , so thank you in advance for the reply.
Thanks for the questions, and glad to hear you’re looking into Serverless and Cloudflare, it’ll serve you well I think!
As for the questions themselves:
Yes absolutely, I think you could either host it all under your account or get them to have their own and connect it all in via Git or however you want to do it - guessing the former will be easier for you to manage, and I don’t believe there’s anything preventing you doing that. And as you’ve probably seen, at least for static requests, it’s entirely free and you get the benefit of Cloudflare’s global network + cache.
I’m not sure I’ve heard of it, but I guarantee there are people doing it - I’m not sure there’s any need to get away with it though, and I don’t think there’ll be any problems with wallets, as it’s very competitively priced for when you need to run compute (e.g. Workers, Pages Functions etc.).
I use it whenever I design a new system, or need to document an existing one - so it’s definitely not all the time, as it’s not every week or even every month you do that. I do think it serves exceptionally well as documentation, as well as a medium for designing and fleshing out possible architectures for systems, and a big benefit is the context view is even great for discussing with non-technical stakeholders too.
Hello again, @ashleypeacock. Thanks for the response to my questions.
Thank you. Now I can confidently proceed with my goal of “conquering the region” by disrupting the web hosting market
I think I saw a tweet of someone who had a website that was getting crazy views/hits monthly(millions to be specific) and when he shared his setup: it involved Cloudflare workers! I and many others were sceptical. It sounded too good to be true. I guess he was right after all, Cloudflare really is an open secret.
Another question: do you have a specific tool you use when drawing the C4 diagrams. Nothing fancy or complicated(Excalidraw is off the table for now), is there anything particular that you like/use a lot?
And yes your answers were helpful. Very helpful as a matter of fact. Now it’s time to take the first step and get started with this whole serverless thing.
I asked about serverless in your last AMA so this time I have a question about Diagramming - do you have a favourite app for this? Also have you tried Sketch? (What do you think of it?)
Also since staying healthy is so important, is there anything you do to mitigate the negatives of working at a desk/computer all day?
I think I saw a tweet of someone who had a website that was getting crazy views/hits monthly(millions to be specific) and when he shared his setup: it involved Cloudflare workers! I and many others were sceptical. It sounded too good to be true. I guess he was right after all, Cloudflare really is an open secret .
I think what might help further with confidence is how vast Cloudflare is - something like 20% of the websites in the world are served via Cloudflare. If you have sites hosted elsewhere (e.g. VPS) you can put Cloudflare in front of your application and it’ll serve from cache rather than hitting your VPS and generally reduce latency / load. But my point is more, the sheer size of the network is huge to serve this kind of traffic, so it’s going to be reliable for sure.
Another question: do you have a specific tool you use when drawing the C4 diagrams. Nothing fancy or complicated(Excalidraw is off the table for now), is there anything particular that you like/use a lot?
I use Mermaid JS, its C4 support is experimental but does work - and you can also use the Flowchart and achieve C4 with that too if you play around (AI is probably quite good at doing it as a starting point!). It has the bonus of you can take the Markup used by Mermaid, throw it in a Markdown file in GitHub, and GitHub will render the diagram - so you don’t lose your diagram’s source or have to faff about exporting images etc.
I asked about serverless in your last AMA so this time I have a question about Diagramming - do you have a favourite app for this? Also have you tried Sketch? (What do you think of it?)
I haven’t seen Sketch before but it looks pretty neat, if I want to do UI-based diagramming I tend to just use draw.io as it’s pretty simple but Sketch looks really neat. If I want the diagram to be long-lived (e.g. in technical documentation, READMEs) then I use Mermaid JS as you can rapidly create diagrams using that (LLMs are also very good at creating Mermaid diagrams, so it’s super fast!).
Also since staying healthy is so important, is there anything you do to mitigate the negatives of working at a desk/computer all day?
I like this question! I mainly try to mitigate it by keeping active - I actually choose to go to the office several times per week even though it’s not required, as then I get up at a reasonable time, get a walk before work and on the way home and at lunch.
And then besides that, I go to the gym a few times a week and I’m a keen rock climber, so I do indoor bouldering a couple of times a week too.
Oh nice. I just took a look at their data centre locations and they have many in Africa including Nairobi and Kigali! I’m stumped, like where have I been looking all these years?!!
Just found Mermaid Chart off the link you shared. This is exactly what I wanted.
Thank you, Ashley. Now it’s back to work for me!
I think you’ll like it Ashley (I love it!) I’m glad they bought back the purchase option (they went sub-only at one point). If you end up getting it let us know how yo get on with it.
Ah nice! I wouldn’t mind trying rock climbing one day - but not for anything crazy! Some of the climbs I’ve seen people do look really dangerous, eek!