đŸ Archived View for tilde.pink âș ~ssb22 âș design.gmi captured on 2024-02-05 at 10:32:16. Gemini links have been rewritten to link to archived content
âŹ ïž Previous capture (2023-01-29)
-=-=-=-=-=-=-
Iâve sometimes been asked for advice on how to go about setting up a website for a new business.âWhat Iâve said usually boils down to this:
âQuick, cheap or good: pick two.ââIf someone asks *me* for advice, I assume they want âcheap and good, but not quick.â
A slight improvement is to use a site-generating tool thatâs *separate* from the hosting provider, which at least means youâll have *access* to the underlying code (even if itâs messy) so someone might be able to make small fixes later.âMy barber generated a site with such a tool, and when she started to have hosting problems I put the files onto my Appspot account and made some *very small* code fixes but nothing major (doing it âproperlyâ would need a rewrite).
1. Your startup may âsucceedâ and get big very quickly, in which case youâll want a *good* site in place that can scale up quickly,
2. or your startup may âfailâ in which case youâll want the loss to have been cheap and youâll want to have at least learned some skills along the wayâand making it good is a way to learn.
(Barely a day after writing this, I received a personal email from Facebookâs infrastructure department asking if I want to interview for a senior job thereâI turned it down citing their bad privacy record, but itâs interesting that they said they were asking because I knew Python, Nginx and Unix + GNU/Linux, which is probably what youâll learn if you set yourself the task of building a *good* web server for your company.)
Common advice for startups to test the market by releasing a âminimum viable productâ early should not apply to your systemâs overall architecture: you might still want to release it early, but at least it should be clear that you *are* developing something to be taken seriously and you *do* know where youâre going.âIt may be âminimumâ but letâs not forget the âviableâ part.
Cheap and good means learning things yourself.âNo âshortcutsâ (otherwise it wonât be cheap and/or it wonât be good).âIn particular:
1. You will learn to write your own HTML code in a programmerâs text editor.âProperly.âNo excuses (see above).âYou might then make template code to generate parts of it, but youâll still need to *understand* what this is doingâdonât just pick some third-party tool without fully understanding how it works, otherwise you will likely run into a problem like âI want to change X but the third-party framework Iâm using doesnât let me make that changeâ so youâre no longer in *full* control of the quality of your site.
Too many developers seem to be in a race to use as *many* third-party components as possible, perhaps thinking a âlaundry listâ of âtechnologiesâ would make them more employable in futureâand the component makers are happy to oblige by inventing more and more items for the list.âBut âI touched a hundred tools without understanding any of themâ is not as good as âI really know what Iâm doing with the basicsâ so get that *first* and then youâll know how to evaluate which third-party components are worth using (if any).
2. Learn the importance of a âtext firstâ approach.âFancy graphics can come later, but *search engines may penalise your ranking* if you use graphical controls that blind people canât read because there is no text for their assistive technology to speak.âI of course actually care about blind and partially-sighted people so I want you to do âaccessibilityâ for its own sake, and in some countries you are also required to do it by law, but I think my âtrump cardâ argument is accessibility is good SEOâthe details of the ranking algorithms are proprietary secrets, and it is said they use accessibility as one of their âquality signalsâ but we donât know what specific things they look for, so youâd better just *do accessibility properly* if you want to rank well.
Too many sites design the graphics first and then try to add hidden text labels as an afterthought.âThey can miss things (and be penalised).âYouâre less likely to make this mistake if you make it text-only *first*, adding graphics only later.âIf any tutorial tells you otherwise, itâs wrong and please donât use it.
While youâre at it, learn how to write code that labels which human language the text is in, e.g. English or Chinese.âSearch engines and screen-readers may do better jobs if languages are properly labelled, especially if you use two or more on the same page.
3. âMobile firstâ is good too as search engines also evaluate sites based on how well they work on a small mobile-phone screen (which some people use, and meanwhile partially-sighted people using giant print on desktops essentially turns the desktop screen into an enlarged mobile-phone screen).âThis basically means donât do fancy screen layouts, or if you *do* then make it âresponsive Web designâ that responds to any window sizeâand I mean *any* window size, not just a few presets for specific test devices.âTry *slowly* dragging your browser windowâs resizer from full width to very narrow column, and check your site looks sensible at *every* size in between: this usually requires proper logic.âPeople who think they can do it with two separate rigid designs (one for a big screen and one for a small screen) donât *really* know what responsive design *is*: there are thousands of devices out there and you wonât know the zoom settings of each one, plus the search engine that evaluates your site for mobile compatibility might randomly change the size of screen it looks at.
By the way, if any learning material tells you to do your screen measurements in âpixelsâ *throw it away* because you should be using font-dependent units (e.g. ems)âthere *are* times when pixel-measurements really are needed (e.g. image gallery), but in general you need to learn to respect different font-size settings, which you may also be âgradedâ on during ranking.âDonât just scramble to fix this at the endâitâs easier if you know it all along.
4. Avoid indiscriminate copying.âMost of the worldâs web design is bad, so please donât just copy the design of some other website without thinking.âNot only do you risk litigation, you could also be copying their mistakes.âDo your research properly first: what did they get right and what did they get wrong?âYou can probably do *better* than them if you donât let them restrict your design decisions.
5. Learn to run a lightweight server.âEven if youâll end up paying a data-centre to host your site, youâll still benefit from knowing how servers *work* so you wonât need as much support from them (plus youâll have the skills to evaluate how good their data-centre really is), so I highly recommend running the prototype on your *own* equipment.âAnd challenging yourself to reduce the server resource consumption not only teaches you new skills but will also save on data-centre costs if your company expands later: being able to serve dozens of people with nothing more than a Raspberry Pi plugged into your router and a dynamic DNS account, should make you able to serve *thousands* of people from a modest instance at a data centre, so you can avoid excessive âscale-upâ costs and also reduce climate change.
Nginx may be harder to set up than the more traditional Apache server, but the extra effort buys you a *lot* more performance per server unit.âAny âback-endâ logic is best handled within an asynchronous framework, like TornadoWeb or FastAPI in Pythonâagain perhaps not as straightforward as conventional programming but it *will* scale better.âLarge media files are best avoided, but if you must have them then you might need to think about serving them from somewhere *other* than your more flexible but bandwidth-limited prototype logic serverâand that separation is good practice for if you get big enough to want to use a CDN to spread the server load.
6. Use version control.âIf you donât know what a version-control system like Git is, learn it now and use it from the start.âNot only will it help you keep a log of what youâve changed and when (which might be useful if you have a âhow did this thing break?â situation later), it also gives you more assurance that âitâs OKâ to try things out, as you can always go back to the stable version.âIf you later end up collaborating with other people on the code, version control becomes *even more* useful, but even for code youâre writing all by yourself it is still worth keeping that log.
Not only should you keep track of the code and data of your site, but if youâre running that lightweight home server you should be running, you should also keep its configuration files in version control.
7. If you control a (sub)domain (as you should), use it to register for Google Search Console Tools and make sure it can email you if it finds a problem with your site.âDonât *rely* on this as the only way to find problemsâGoogle will *not* tell you about *every* problem it finds; ideally you should try to avoid making the mistakes in the first place, and you should also carefully test all aspects of the site yourself.âBut if Google does want to tell you about a problem, then you probably do want to receive that information.
The above notes are provided in the hope that they will be useful, but I cannot accept legal liability for things like what your company does. All material © Silas S. Brown unless otherwise stated. Apache is a registered trademark of The Apache Software Foundation. Facebook is a trademark of Facebook, Inc. Git is a trademark of the Software Freedom Conservancy. Google is a trademark of Google LLC. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Python is a trademark of the Python Software Foundation. Unix is a trademark of The Open Group. Any other trademarks I mentioned without realising are trademarks of their respective holders.