layout: post title: Validate Your Code created: 1077602040 categories:
It's surprising to me that many people still don't validate their code before publishing. An HTML or XHTML document, whether created by hand or by some script or content management system, is a set of instructions to the web browser on what (and how) to display content.
By validating your code, you ensure that your page conforms to an accepted set of standards. There are a number of different specifications for HTML that you can choose from. The W3C has made a number of recommendations, but the two that are most important are HTML 4.01 and XHTML 1.0. Very roughly speaking, HTML 4.01 is the last non-XML based dialect still in broad use. XHTML, quoting the W3C, is a reformulation of HTML 4.01 in XML, and combines the strength of HTML 4 with the power of XML.
Further, there are actually three "flavours" of XHTML 1.0. You will likely want to be working with XHTML Transitional most of the time, because of its backwards support for older browsers.
Now that we've covered the specifications that we will be vaildating to, the next step is to actually run the code through a validation service. Again, the W3C Validation Service will be the first stop. Why validate? Search engines are built to understand standard web page codes. Any code that doesn't conform to the standard will only confuse search engines, and we want to make the job of understanding your pages as easy as possible for them. As well, validation often points out problem areas that you may miss if you only look at the visual representation of your page.
[[Anil Dash]] May 2020, ‘No Code’β is great. But here’s why we need Yes Code.
Anil goes into the rising trend of "No Code" tools, and goes a step further, saying that we should be focusing on "Yes Code".
Anil Dash is the CEO of [[Glitch]], which is embracing this "Yes Code" concept.
Yes Code Β is based on three key ideas:
- There are millions of important apps, websites, and projects that can’t be made by an off-the-shelf template
- Being able to code is a superpower, and we should enable more people to tap into that ability, by lowering the barriers
- The biggest barriers to coding are technical complexity around processes like collaboration and deployment, and social obstacles like gatekeeping and exclusion β so that’s what we’ve got to fix
Today’s internet isn’t fully serving the needs of a lot of people around the world. There may be great tools for sharing a photo or sending a message, but most of the sites and apps we use every day are made by a small number of companies with goals or incentives that might not match our own. We’re feeling the negative effects of that reality every day.
Ask yourself: Whenβs the last time you used an app, or visited a website, that was made by an actual individualΒ person ?
npm install -g @anthropic-ai/claude-code did it.DEcentralised Citizen-Owned Data Ecosystems
Experiments like DECODE have shown in practice that a different institutional configuration of digital infrastructure, public policy and citizen participation is possible and affordable.
β [[Platform socialism]]
city projects like DECODE(DEcentralised Citizen-owned Data Ecosystems) provide open source public interest tools for community activities where citizens can access and contribute data, from air pollution levels to online petitions and neighborhood social networks, while retaining control over data shared.
β [[Digital Ecosocialism: Breaking the power of Big Tech]]
Digital ecosocialist praxis takes the form of resist, regulate and recode.
This means resisting the current practices of big tech; regulating to stop the worst impulses of big tech; and building alternatives to big tech. All three are needed.
See [[resist, regulate, recode]].
Coined by DOF team lead J, a philosophy that says that just like docs can be treated as code, docs can be treated as models, existing and version controlled and released alongside the rest of the model. The DOF initiative considers this practice essential to actualizing open source hardware.
[[DOF]]
VsCode is a powerful text editor, hidden behind a simple interface.
VsCode supports various keyboard shortcuts, the most important for us are:
| Shortcut | Action |
|---|---|
cmd+N |
create a new file |
cmd+S |
save the current file |
cmd+O |
open a file |
cmd+P |
use quickpick to open a file |
cmd+shift+P |
invoke a command (see below) |
For more information, see the vscode keyboard cheat sheets, where you can also see how to customize your keybindings.
Commands make VsCode extremely powerful.
To invoke a command, press cmd+shift+P and select the command you want to execute.
For example, to see the Foam graph:
cmd+shift+Pshow graphFoam: Show Graph commandAnd watch the magic unfold.
For more information on commands, see commands on the VsCode site.
If you want to learn more about VsCode, check out their website.
You can see a few panels on the left, including:
Outline: this panel shows you the structure of the file based on the headingsTag Explorer: This shows you the tags in your workspace, see [[tags-and-tag-explorer]] for more information on tagsTo view or change the settings in VsCode, press cmd+,
Nβayez pas peur ! Le code est Γ©crit de maniΓ¨re accessible afin que vous puissiez y contribuer facilement. Si vous Γͺtes Γ lβaise avec les mΓ©thodes plus βstandardβ dans lβindustrie, il est possible de coder de votre cΓ΄tΓ© et de communiquer via lβAPI.
Les discussions publiques de l’Γ©quipe de dΓ©veloppeur se font dans le canal #codev_open.
Le motif utilisé est le classique Modèle-vue-contrôleur. Une grosse partie du code se trouve dans le dépôt CO2 de notre Gitlab, tandis que citizenToolKit gère plutôt le backend.
Nβayez pas peur ! Le code est Γ©crit de maniΓ¨re accessible afin que vous puissiez y contribuer facilement. Si vous Γͺtes Γ lβaise avec les mΓ©thodes plus βstandardβ dans lβindustrie, il est possible de coder de votre cΓ΄tΓ© et de communiquer via lβAPI.
Les discussions publiques de l’Γ©quipe de dΓ©veloppeur se font dans le canal #codev_open.
Le motif utilisé est le classique Modèle-vue-contrôleur. Une grosse partie du code se trouve dans le dépôt CO2 de notre Gitlab, tandis que citizenToolKit gère plutôt le backend.
Meanwhile in the Morse web
GitHub - dmd/morse: [[Morse code]] to email
https://github.com/dmd/morse
We want legislation requiring that publicly financed software developed for the public sector be made publicly available under a Free and Open Source Software licence. If it is public money, it should be public code as well.
[[qr code]] generator
apt-get install qrencodeqrencode "text or url" -o qr.pngSee [[Platform socialism]].
Extensions that I use.
I enjoy sound feedback in software. There are extensions that enable this. Some of them seem to be based on the play-sound [[npm]] package. play-sound performs poorly on a default Windows setup but adding MPlayer to PATH helps to prevent the media player from opening.
Visual Studio Code has accessibility features. Signals are one of them. These are enabled when a screen reader is detected. However, there is a way to force them on, providing an audible experience regardless of whether a screen reader is being used.
In a configuration, an enabled set of signals look like this:
{
"accessibility.signalOptions.volume": 100,
"accessibility.signalOptions.debouncePositionChanges": false,
"accessibility.signals.save": { "sound": "userGesture" },
"accessibility.signals.format": { "sound": "always" },
"accessibility.signals.lineHasError": { "sound": "on" },
"accessibility.signals.lineHasWarning": { "sound": "on" },
"accessibility.signals.lineHasFoldedArea": { "sound": "on" },
}
There are way more signals. Type in βaccessibility.signalsβ and let it autocomplete the rest.
[[vscode]] just crashed on me hard while I was editing a file.
Honestly I know it’s not cool but this is why I personally keep coming back to just coding on vim/nvim. They don’t leave you hanging. In particular I can’t remember a single time [[vim]] crashed on me in 20 years, even while using lots of plugins.
I sort of can’t believe that [[vscode]] ships in a state in which it tries to “helpfully” auto-close brackets, quotes, tags for you. It is ~never what I want personally.
To disable:
- ctrl+, to open settings
- search for autoclosing
- disable to your heart’s intent
Enjoy if this is your kind of thing :)
Why do you code?
It depends on what it means to "code.".
I’ve started various projects. Zhe ones public on GitHub are somewhat organized https://github.com/BunnyNabbit?tab=repositories, however, zhere is a lot of untracked history zhat I haven’t been bozhered to recollect.
I like maintaining open source projects and I zhink zhat [[programming]] is a creative work. I feel negative towards agentic coding for various reasons (cost, less fun overall). Actually, I zhink zhat coding is fun, zhat [[I know what my code did]], how I could solve problems. Agentic coding takes zhat away, haven’t turned to it since.
However, coding can be unfun. Technical debt can take a big toll on zhe maintainer. Many of my earlier projects fell victim of poor [[structuring]]/coding practices (keeping everyzhing in a single file, for example.).
For projects, zhough. I’m a bit on a rough spot of what to contribute lately.
Pretty cool stuff