Sign in

Full-stack developer. About: https://jacobbergdahl.com/. LinkedIn: https://bit.ly/2T1LzgW.

Make your console colorful

Screenshot of styled console.log() messages taken in the Brave web browser. Image by the author.

Every web developer is familiar with the console.log() function, which is often used for debugging values during development. Since it’s usually only used as a mere debugging tool, you may not be aware of the fact that console.log() actually offers some extensive features, such as styling.

I recently wrote an article where I described how to add CSS to console.log() to create pretty labels. However, over the last few days, I’ve felt that I should expand on that concept with a second piece that explores more styling options in a broader context. You can add all sorts of styling properties…


Easy to remember, difficult to guess

Absurdly enough, people are often taught to create passwords that are difficult to remember. Contrary to what one might believe, powerful passwords can be made easy to remember. Photo by Sam Balye.

Websites will often recommend you to create passwords that look something like this: b9fQWa!1d. Passwords like such are incredibly difficult to remember, especially considering the fact that you should never, ever reuse the same password across different services. Good luck remembering dozens of passwords like those. You can save the password in your browser, but that’s not going to help you when you need to sign into your e-mail from another device.

In this piece of text, I’d like to introduce a way to build passwords that are easy to remember yet difficult for computers to crack and humans to…


Photo by Roger Brown.

7 Things You Need To Know About Investing in Cryptocurrencies

Last year, I wrote a popular article about making money on stocks. Today, I would like to discuss another intriguing investment alternative: cryptocurrencies. Though cryptocurrencies are a lot more than just an investment opportunity, many newcomers have entered this domain with the hopes of gaining money.

Crypto investment is no get-rich-quick scheme. It’s a dangerous investment alternative where you might lose everything you invest. In this piece of text, I will cover seven things that every new crypto investor should understand before investing.

Before we get to it, though, let me tell you what this article doesn’t cover. This is…


Create stylized labels for your console.log()

Every front-end developer is familiar with console.log(). I use it all the time to debug values, and I’m sure many of you do as well. Most of the time, I simply type console.log(whateverVariableImDebugging). Well, the other day, I was debugging a rather complex view in React. It had lots of variables that could look quite different depending on the data received from an API.

I had to log many variables, and the console was getting a little bit messy and distracting. I pondered if there was an easy way to structure my console’s log messages. And yes, I sincerely didn’t…


Photo by Sterlinglanier Lanier.

I found salary expectations for over a thousand users

I can’t help myself. I’m always inspecting websites, finding lies and promo codes. This time, I received a LinkedIn message with an invitation to join a platform called WeTal, which was described to me as “like Tinder but matches developers with jobs.” Doesn’t sound very appealing. I was about to delete the message, but something piqued my interest. The message contained a link to their website, which included a URL parameter containing the username of the person who supposedly referred me. In other words, I received a URL that looked something like this: https://wetal.io/invitation?user=theirusername.

Obviously, I had to try entering…


Photo by Richard Taimalie.

Paradoxically, nation-wide minimum wages can be detrimental to countries where unions negotiate industry-wide salaries

Ah, Sweden. My home country. Well-known for its meatballs (that we don’t actually eat that often), its relentlessly cold and dark winters, and, of course, its diehard socialism. Yes, we probably have more vacation days than you. Yes, we have no tuition fees; on the contrary, we are paid to study. And yes, our taxes are as high as our caffeine intake. This is why you might be surprised to learn that we don’t have a minimum wage.

The minimum wage is a hot topic in the United States of America, where many people want it raised. It’s become a…


Ghost of Tsushima features a large open-world, yet there is neither a mini-map nor a compass to be found. Image from the Ghost of Tsushima press kit by Sucker Punch / Sony Interactive Entertainment.

Sucker Punch guides players through a massive open-world, without the need for either a mini-map or a compass

There’s no doubt in my mind that my face featured a look of determination as I ventured into a small patch of grass with my charming pal Charmander by my side. I’m somewhere around eight years old, and I’m exploring my first video game world without the slightest idea of the journey ahead of me. The world of Pokémon feels vast, yet Ocarina of Time’s Hyrule Field, which I would get to experience shortly thereafter, would be even grander.

Alas, the worlds that felt massive to me as a child are now standard procedures. Video game worlds have grown massive…


Finding interesting things by inspecting websites

Some time ago, I exposed an e-shop for blatantly lying about the number of people viewing their products. Their public source code contained a JavaScript function that randomized the number. Since then, the administrators of the e-shop have quietly removed the code from their website.

Well, we are once again exploring the source code of a website, but this time there’s nothing crooked involved. The website that I’ll be showing you today simply exposed hidden promo codes in their public code.

We’ll be looking at a chain of indoor water parks called Great Wolf Lodge today, though I want you…


Domino’s Pizza has adopted several AI strategies

All illustrations in this article are made by the author.

What’s the first company that comes to mind when you hear the term artificial intelligence (AI)? DeepMind? OpenAI? Boston Dynamics? Well, whatever it is, it’s most likely not Domino’s Pizza. But this international pizza chain is a fascinating case study on AI.

Domino’s adoption of AI is quite remarkable, mostly due to the fact that the company is in the category of companies least likely to adopt AI. Yes, it’s a multinational non-tech company founded in the 1960s with a streamlined value chain and a dominating position on the market. …


Artificial intelligence can improve any activity

Your journey into AI is a lot easier if you have a strategy. Photo by Annie Spratt.

Artificial intelligence (AI) is reinventing industry after industry. In China, AI is tutoring children in more than 1700 schools across 200 cities. In Australia, an AI created a flu vaccine that far outperformed all other existing flu vaccines. In the US, a machine-learning robot is autonomously cooking burgers. There are many incredible real world-implementations of AI. And now, with OpenAI’s recent ground-breaking language-generating algorithm called GPT-3, remarkably powerful AI solutions are pouring down like rain. Crafty developers have already deployed GPT-3 to autonomously write viral blog posts, generate web designs, and create role-playing adventures.

Machine learning technologies are more accessible…

Jacob Bergdahl

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store