Domain Driven Design (DDD)
Domain Driven Design (DDD) is an influential book by Eric Evans from 2004 - sometimes also referred to as “the big blue book”. This blog post summarizes some of my own understanding of the book and gives you an introduction to domain driven design.
Important definitions Domain The domain is the area in the real world which we are writing a computer program about.
Model The model is our representation of our domain.
How to write clean code?
This is a quick review of some important parts of the book “Clean Code: A Handbook of Agile Software Craftsmanship” by Robert C. Martin.
Advantages of clean code Better use of your time: Code is read a lot, you forget things, so clean code helps you quickly grasp what the code did. Easier onboarding: Getting co-workers up to speed is much easier if the code base is clean. Easier debugging: Others can help you out, since the code is understandable, even non-programmers like a project manager might be able to spot things.
What the heck is ~~ in JavaScript?
A note on bit-wise operations Today I read some JavaScript source code and stumbled on a line like var delta = ~~time; and I was unsure what that purpose of using ~~ was.
So I started to research and digging a bit deeper. It turns out that the binary not operator (~) when applied twice on a floating number (e.g. 4.12) returns an integer (~~4.12 = 4).
Why not simply use Math.
mod_rewrite operations you should know about
Rewriting URLs using mod_rewrite Every so often as a web developer, you might have to write a redirect of some URLs to some other ones to an .htaccess file. If you remember these tips here, you will probably have most of the stuff you need:
Redirect a specific URL to another URL Redirect 301 "/old-page.html" "/new-page.html" 301 here means it is a permanent redirect. Over time Google and other search engines will then replace the old URL with the new one in their index.