Essays about code
By code we include semantic HTML, CSS, JavaScript, Typescript. Also types, components, functional programming, formatting, linting, testing, naming, etc.
- From event delegation to true pubsub.
- We turn the simple event delegation system we created in our previous essay into a true PubSub system.
- PubSub is a great way to decouple components.
- An excellent way to decouple our web page components is to use a PubSub system (effectively, an event bus). One component publishes; another subscribes.
- Start with workable HTML forms, then make them better.
- Once we have our HTML forms working (and validating) well without recourse to JavaScript, we can use a bit of JS to enhance their capabilities.
- You can validate your forms without JavaScript.
- Your forms can validate themselves. We can create forms that work without JavaScript, then add just enough JavaScript to enhance that validation.
- Best for accessibility, usability, performance, sustainability.
- First create a responsive-by-default page with semantic HTML. Then it is easy to make it moʼ better with progressive enhancement.
- Until we use CSS to blow it.
- HTML is responsive by default. Then we add CSS and destroy that responsiveness. Often, this is because we didnʼt get the HTML right from the start. Semantic HTML is the key.
- The uncarved block … of code.
- A wise young coder once said, “never write a line of code until you have to”. At Craft Code, we took that advice to heart. Now we write code just in time.