Blog

The ExpressJS Router

ExpressJS is probably the most popular framework for creating server-side web applications in Node.js. In this blog series I want to show you how to get started and how to do it The Right Way™. Articles in this series so far Get Started With ExpressJS ExpressJS Project Structure The ExpressJS Router…

ExpressJS Project Structure

ExpressJS is probably the most popular framework for creating server-side web applications in Node.js. In this blog series I want to show you how to get started and how to do it The Right Way™. Prerequisites Basic knowledge of Node.js and npm Some intermediate JavaScript knowledge Basic HTML and CSS…

Get Started With ExpressJS

ExpressJS is probably the most popular framework for creating server-side web applications in Node.js. In this blog series I want to show you how to get started and how to do it The Right Way™. Prerequisites Basic knowledge of Node.js and npm Some intermediate JavaScript knowledge Basic HTML and CSS…

Get Unstuck!

Some code in my application is being naughty and won't do as I tell it. And I just cannot fathom what could possibly be wrong! I've had this issue for days now. No matter how I look at it, I just can't see a way out. I'm a stubborn fellow, so I dig in deep and keep gnawing at this problem until I…

What In Tarnation Are JavaScript Prototypes?

A friend of mine asked me the other day about the MDN JavaScript manual. He noticed something odd when he looked up a function. For example, the title on the page for "forEach" was not "forEach". It was "Array.prototype.forEach". My friend wanted to know what that prototype thing was all about. This…

What to put in your portfolio as a beginner web dev

Last week I wrote up a list of advice for beginner web developers. One of the bullets on the list was to build a portfolio. But the challenge with this is that beginners have nothing to show. Or do they? Here is a list of ideas for beginner portfolios. Please share yours too at the bottom. The code…

My Advice To Beginner Web Devs

I have been messing around on the World Wide Web since it was a thing. Today I teach Web Developer classes at college. Here is my advice for beginning web developers. Doesn't matter how you did it Don't spend too much time fussing over your solution to a problem. If it works, you did it right. It…

Blogging

I recently listened to an episode about blogging from The Ladybug Podcast. It is a new podcast series by Emma Wedekind, Ali Spittel, Kelly Vaughn, and Lindsey Kopacz. I cannot recommend this podcast enough. It is friendly, the topics are relevant. And, it is a win for everyone to listen to these…

How To Get a Comment Section On Your Static Site

In this article, I will show you how to implement a comment section on a static website with no backend. But first, let me explain what a static site is, and what a backend is. Static Site A static site is a website that has no dynamic content. Usually, they are written entirely with HTML, CSS, and…

Modern JavaScript Today

JavaScript is a language that evolves at a break-neck pace. Within a few years we have gotten custom elements and ES6 modules. As a developer, it can sometimes be difficult to keep up. It can be even more difficult to write applications in a way that is both modern, future proof, and works on all or…

target="_blank"

A lot can be said about links that open in a new window or tab. Whether it is a good idea to do so or "best-practice" is not the scope of this article. What I would really like to discuss is what we can do in those cases where opening a link in a new window or tab, for whatever reason, is necessary…

Optimize Your Website

If you have ever used Google Chrome's Audit tool you've probably noticed that almost no matter what you do Audit will tell you that your CSS is blocking the rendering of your site. If you take a look at the report details Google recommends loading critical parts of your styling directly in the…

Single Page Application med ren JavaScript

React.js, Vue.js og Angular.js er alle tre meget populære biblioteker der bliver brugt til blandt andet at bygge Single Page Applications (SPAs). I dette indlæg vil jeg vise dig, hvordan du selv kan lave et lille bibliotek, der gør mange af de samme grundlæggende ting, som for eksempel Angular.js…

Dynamic Font Sizes

There are easy ways to use CSS to make a font-size adapt to the size of the screen it is rendered on. With this fluid font-size, your font is always 1% of the width of your viewport. This means that if you have a small screen your text is small. And on a big screen, the text is big. But, if you use…

Signed Web Tokens

I dette indlæg vil jeg demonstrere hvordan du kan lave et signed JSON web token. Dette er et token, der består af at JSON-objekt og en signatur, som skal forhindre at nogen kan ændre tokenets indhold. For at komme i gang, skal vi bruge et kryptografi-bibliotek. Jeg bruger node.js' eget bibliotek…

So, What's A Block Chain?

I recently decided to dig down into the whole thing about blockchains, because I thought it sounded really interesting. I never actually bothered with trying to understand more than the very basic concept of BitCoin, but until now I also never understood what it actually is. The core concept behind…

Bedre dokumentation

Vi har alle set de her overkommenterede stykker kode, hvor nærmest hver eneste linie ender i en kommentar, der forklarer hvad den linie gør. Efter min mening er dette helt overflødigt. Kommentarer i kode bør altid have et klart formål - og hvis du har brug for at forklare hvad din kode gør, så har…

Pixel-perfect Photoshop til CSS

Hvordan afkoder man de typografiske begreber i Photoshop, så de kan bruges i et stylesheet til hjemmesider? Typografi er et utroligt vigtigt designelement, som de fleste integratorer overser, når de konverterer et professionelt Photoshop-design til HTML og CSS. Og det er egentligt ret ærgerligt. Lad…