logo

Custom-coding a landing page in 45 minutes

/ Development / JavaScript / Marketing

Getting feedback from your target audience early on in product development is pure gold! This helps you make reusable components that allow you to iterate, build and test out new ideas a lot faster. This is what I did with weremote.ro and all that feedback and community involvement helped me create a non-intrusive UI/UX that I can reuse on weremote.eu, which is coming soon. It’s what enabled me to create the landing page for weremote.

Read more →

How to check if a JavaScript object is empty

/ JavaScript / Software Development

I had the following snippet of code and wanted to log an error only if whatever the catch block receives is an actual object with actual values. Needed a solution. try { const attr = await this.contract.methods.attributes(index) .call(this.defaultConfig); const identifierText = Web3.utils.hexToUtf8(attr); return identifierText; } catch (attributeNotFoundError) { logger.error(`Attribute not found`, attributeNotFoundError); return null; } The code calls a smart contract getter, using Web3.js, retrieves whatever the return value is, and returns its plain text representation.

Read more →

Here’s Why We Just Can't Agree on One JavaScript Framework

/ Quora / Opinion / JavaScript

Indeed! Why can’t we just get along and use one single JavaScript framework? Or two!? Here’s what I think about this situation that a lot of people consider a problem. I think it’s a huge opportunity, actually! This whole disagreement is actually one of the things that made JavaScript so popular! What follows is a dichotomy between two world views on the same topic. Part 1: The Pessimistic View There is a lot of personal preference involved, along with ignorance, hype and superficiality.

Read more →

Six Things About JavaScript Which If You Don't Know, Signal to Others That You Are Still A Beginner

/ JavaScript / Quora

This is a question I’ve struggled with a lot, while trying to optimise the way I interview people. I don’t want to misjudge people, or evaluate them the wrong way, so I took some time and dug through my head, scoured the Internet for resources and narrowed down to a simple list. This is not a definitive list, I must state this loud and clear, before you even start reading. None of the points outlined here should be taken in isolation.

Read more →

What do the three dots (...) mean in JavaScript?

/ JavaScript / Software Development

The title of the article is from a question I was asked to answer on Quora. Below, is my attempt to explain what do the three dots do in JavaScript. Hopefully, this removes the fog around the concept, for people who will find this article in the future and have the same question. Updates Added more explicit usage of Array.prototype.slice.call(arguments). Thanks @gabriel for commenting and providing feedback. Added resources section with useful links.

Read more →

ESLint backdoor what it is and how to fix the issue

/ JavaScript

On Thu, July 12 2018 at 1:17PM GMT Andrei Mihailov — @pronebird reported the following issue with the eslint-scope module: Virus in eslint-scope?. The gist of it is that there was some malicious code added to the module’s codebase and the affected version was 3.7.2. I’m saying it was because the ESLint team took it head-on and got to the bottom of the problem in record time — Thank you!

Read more →

Environment variables in Webpack builds vs. Node.js apps

/ Software Development / JavaScript

I recently had a discussion with an off-shore team mate who was supposed to add a new environment variable to a client-side app and re-deploy it. He had some trouble doing this, and after talking to him and illustrating how frontend apps use env vars in contrast with Node.js APIs, he finally understood the nuances His misunderstanding was about the way Webpack manages environment variables. Being an ops person, he assumed that environment variables work the same way they do for our Node.

Read more →

How to test Node.js modules installed from NPM locally

/ Videos / JavaScript

I’m surprised by the number of people who think you can install modules from npm only in your project’s folder, and only if you have package.json. This is why I decided to create a short video describing my way of testing modules from NPM before bringing them into my application, without having to wait for livereload, builds and other tools to run, before I can see some relevant output. Enjoy!

Read more →

How to get the real type of any JavaScript variable

/ Videos / JavaScript

This weekend I published a short article talking about how to create a CSV using template strings in Node.js. I posted the link on Reddit and a couple of more places and the general feedback was something along the lines of “great article but the most interesting part is that type checking thing”. I decided to record a short screencast, this morning, to detail how that code works and what you could use that function for.

Read more →

Why do data scientists use Sklearn's StandardScaler and what does it do?

/ Machine Learning / JavaScript

Been doing some Machine Learning “learning” in the past two weeks. I’m interested in learning to use TensorFlow.js at a decent level and solve a personal problem — software estimation and road-mapping, for the teams I work with. This has led me down the darkest alleys of Machine Learning blogs. Most of the relevant material I found uses TensorFlow but with Python. I understand why data scientists choose Python over other languages.

Read more →
Copyright (c) 2023 Adrian Oprea. All rights reserved.