Hello world!
My name is Johan Zetterberg, and this is my personal homepage and blog.
Here I'll write about web and game development.
Articles and blog posts
-
16th May 2023
Standards
Don't use standards.
-
22nd Jan 2023
The explosion of unncessasary syntax in JavaScript
myVariable = myVariable ?? "foo" vs if(myVariable == undefined) myVariable = "foo"
-
14th Jan 2023
Solution to the chicken vs egg problem
You solve the problem by having both (at the same time).
-
12th Dec 2020
Escaping a Promise in JavaScript
Use setTimeout to escape a Promise jail.
-
5th Dec 2020
The browser wars
You might think the browser wars was bad... But a monopoly is worse!
-
23rd Nov 2020
JavaScript coercion
To use three equal signs === or two == in JavaScript?
-
11th Nov 2020
Safari vs Semantic HTML elements
Open letter to the Safari team: Please let me write semantic HTML!
-
17th Apr 2020
Unicode and wide glyph's
Better support for Unicode in webide.se
-
2nd Apr 2020
The happy path
Always follow the happy path when demoing, unless you want to find bugs and issues.
-
4th Dec 2019
TypeScript
TypeScript is a programming language that alike many other languages (CoffeeScript, Dart, PureScript et.al.) can compile to JavaScript.
TypeScript claims to be an extension to JavaScript - which adds static typing. -
1st Oct 2019
The gig economy
Probably the sadest four weeks of my life... I signed up for one of those freelancing sites.
-
5th Sep 2019
Code dependencies and code structure
How a function list can help you write more maintainable code. Ranting about dependencies and programming paradigms.
-
22nd Mar 2019
Bug diving in JavaScript
The program depended on the bug being a bug. And no longer worked when the bug was fixed. But why did it work with the bug, and not without it ?
-
22nd Mar 2019
fork-pty in chroot on Ubuntu 18
How to get fork-pty to work inside chroot in Ubuntu 18
-
7th Jan 2019
Optimizing for "benchmarks"
Making my editor appear “better“ by optimizing for common “benchmarks“
-
12th Dec 2018
Writing code on a mobile phone
The tiny screens of mobile phones creates a huge design challenge for mobile editors/IDE's.
-
28th May 2018
Making a code editor, Part 6
Making a editor/IDE for JavaScript/Node.JS and publishing on Chrome web store.
-
16th May 2018
Adventures in Android land - Part 2
My experience installing Android operating system on a mobile phone.
-
4th May 2018
Hunting a python bug in a chroot
abort: error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
-
17th Apr 2018
JSQL
A general purpuse JavaScript protocol and "query language" for communicating with a server via JavaScript
-
24th Oct 2017
Optimizing web site startup time
Optimizing web app startup time and Pagespeed score
-
26th Jul 2017
Update IP in zone files
A script that updates a IP in zone files, and increment the SOA serial number
-
19th Jan 2017
Exercise's to get better at JavaScript
Become a better JavaScript programmer by only using local variables
-
25th Nov 2016
Prototype, this, and lambda functions in JavaScript
Explains this, prototype, functions and how named lambda functions are used in JavaScript.
-
16th Nov 2016
Coupled code
How to avoid coupled code and increase reusability and productivity
-
30th Oct 2016
Web App Design Patterns
How to simplify a web app using the observer pattern (event listeners), object orientated programming and testing.
-
11th Oct 2016
React vs vanilla JavaScript
Comparing React (framework) with normal JavaScript. And why you don't want to use a Framework.
-
25th Jun 2016
PC gaming on Windows
The state of PC gaming in a security perspective
-
4th May 2016
Android
My experience with Android development
-
22nd Mar 2016
Making a code editor, Part 3
Making a code editor, for web developers, using web technology.
-
22nd Mar 2016
Error Driven Development
Write errors, not tests!
-
2nd Mar 2016
Private variables in JavaScript
Avoid complexity by writing code that do not entangle other code.
-
1st Mar 2016
Version control in a nutshell
Last week when I was programming, I got a Déjà vu feeling, but discarded it as I'm probably just crazy and need more sleep ...
-
16th Feb 2016
Making a code editor, Part 2
Making a code editor, for web developers, using web technology.
-
6th Aug 2015
Don't get stuck on paradigms
Use named functions!
-
6th Jun 2015
Callback hell, the pyramid of doom. How to master asynchronous JavaScript
How to deal with asynchronous functions, Callback hell and the pyramid of doom in JavaScript.
-
26th May 2015
Writing a new text editor for JavaScript in JavaScript
A canvas based JavaScript editor, written in JavaScript.
-
19th May 2015
Javascript this
How to work with this in JavaScript:
Declare a variable with the same name as the function, but with a lower case! -
20th Apr 2015
Good bye Windows and classic ASP
The story about how I switched from Windows and classic asp to Linux and Node.JS
-
17th Apr 2015
Run Node.JS as a Service in Windows
How to use NSSM to run Node JS as a service in Windows
-
17th Apr 2015
Run Node as service in Linux
Use an upstart script to run a NodeJS script as a service/daemon
-
16th Apr 2015
JavaScript Closures
Closures in JavaScript by using named functions.
-
15th Apr 2015
How to build a web application using Node.JS
Use nginx to serve static files and proxy websocket to your Node.JS script.
-
13th Apr 2015
JavaScript Associative arrays
Get around using Object.hasOwnProperty by defining properties you do not want iterate-able with enumerable: false
-
12th Apr 2015
Does JavaScript pass variables by value or reference?
JavaScript works mostly like if variables are passed by value.