teleren/devto huggingface dataset:
AppSignal’s Top 5 JavaScript Posts in 2021
Tags: javascript
Published: 2022-01-05 13:14:39

It’s that time of year again! It’s all just getting a bit festive. So pour yourself some mulled wine and get cozy in your favorite penguin jumper as we share our top 5 JS posts this year.

We had a lot of great posts to choose from, but some stood out and resonated with you more. With no further ado, here are the JS posts that you enjoyed most:

## Top 5 JavaScript Posts in 2021

### [Powerful Caching with Redis for Node.js Applications](https://blog.appsignal.com/2021/03/10/powerful-caching-with-redis-in-nodel.html)

This article explores some of the most interesting nuances of Redis caching patterns, using Node.js as the environment to run some benchmark testing.

### [Best Practices for Logging in Node.js](https://blog.appsignal.com/2021/09/01/best-practices-for-logging-in-nodejs.html)

Learn some invaluable practical tips to help you write more useful log entries in Node.js.

### [7 Ways to Improve Node.js Performance at Scale](https://blog.appsignal.com/2021/11/24/7-ways-to-improve-nodejs-performance-at-scale.html)
Read some practical tips to help you scale your Node.js application to handle more traffic.

### [What's New in Node.js 17](https://blog.appsignal.com/2021/10/27/what-s-new-in-nodejs-17.html)

Have a look at some of the major highlights from the recent Node.js 17 release.

Andddd...**drumroll please** - our top-performing JavaScript post in 2021:

### [Improving Node.js Application Performance With Clustering](https://blog.appsignal.com/2021/02/03/improving-node-application-performance-with-clustering.html)

Discover how clustering can improve the way your Node.js apps handle workload.

## Our Special Mention for 2021
This goes to a post that didn’t quite make it into the top 5. It flew under the radar a little, but we think it deserves another look:

### [TypeScript Compiler API: Improve API Integrations Using Code Generation](https://blog.appsignal.com/2021/08/18/improve-api-integrations-using-code-generation.html)
Find out how you can use code generation to improve your API integrations.

## Happy Holidays ❆ ⛄
This may not be the festive season we were hoping for, but we wish you a wonderful time, whatever you have planned.

Are there any other topics you’d like us to cover? Get in touch at support@appsignal.com!

Don’t forget to [subscribe to our JavaScript Sorcery newsletter](https://blog.appsignal.com/javascript-sorcery) to regularly receive top-notch posts straight to your inbox.

See you in the new year!
AppSignal’s Top 5 Elixir Posts in 2021
Tags: elixir
Published: 2022-01-05 13:12:09

It's that time again: the yearly rundown of our very best Elixir articles!

So take some time to yourself and have a look over our top Elixir posts from 2021.

## Top 5 Elixir Blog Posts in 2021 ⚗️

### [Building Aggregates in Elixir and PostgreSQL](https://blog.appsignal.com/2021/07/13/building-aggregates-in-elixir-and-postgresql.html)

This article describes the roles and implementation of aggregates in Elixir and PostgreSQL.

### [An Introduction to Metaprogramming in Elixir](https://blog.appsignal.com/2021/09/07/an-introduction-to-metaprogramming-in-elixir.html)

In the first of this four-part series, learn some fundamentals of metaprogramming and Elixir metaprogramming secrets.

### [Three Ways to Debug Code in Elixir](https://blog.appsignal.com/2021/11/30/three-ways-to-debug-code-in-elixir.html)

Explore three common methods of debugging code in Elixir, as well as how to debug Elixir processes using trace and observer.

### [How to Test WebSocket Clients in Elixir with a Mock Server](https://blog.appsignal.com/2021/06/22/how-to-test-websocket-clients-in-elixir-with-a-mock-server.html) 

Discover how to implement a long-running connection between two services with WebSocket, and then write unit tests for functionality.

Andddd...*drumroll please* - our top-performing Elixir post in 2021:

### [Under the Hood of Macros in Elixir](https://blog.appsignal.com/2021/10/05/under-the-hood-of-macros-in-elixir.html)

In the second part of our metaprogramming series, find out about the inner workings of macros in Elixir.

## Our Special Mention for 2021
This goes to a post that didn’t quite make it into the top 5. It flew under the radar a little, but we think it deserves another look:

### [An Introduction to Testing LiveView in Elixir](https://blog.appsignal.com/2021/08/17/an-introduction-to-liveview-in-elixir.html)
In this two-part series, you'll get a comprehensive overview of how to test your LiveView applications in Elixir.

## Happy Holidays ❆ ⛄

This may not be the festive season we were hoping for, but we wish you a wonderful time, whatever you have planned.

Are there any other topics you’d like us to cover? Get in touch at support@appsignal.com!

Don’t forget to [subscribe to our Elixir Alchemy newsletter](https://blog.appsignal.com/elixir-alchemy) to regularly receive top-notch posts straight to your inbox.

See you in the new year!
Wednesday Links - Edition 2022-01-05
Tags: java, spring, idea, graalvm
Published: 2022-01-05 13:10:25

11 great Java tricks from dev.java (6 min)✏️
https://blogs.oracle.com/javamagazine/post/java-11-tricks-generics-inheritance-jshell

5 Mundane Java Performance Tips (11 min)🤯
https://richardstartin.github.io/posts/5-java-mundane-performance-tricks

Phaser to synchronize threads for one or more phases of activity (30 sec)🌙
https://twitter.com/piotr_minkowski/status/1478353691027681283

The annual reminder to use yyyy over YYYY (30 sec)🎆
https://twitter.com/ToddGinsberg/status/1475149658884395011

Back to basics: threads - Adam Dubiel (45 min)🧵
https://www.youtube.com/watch?v=5R72E6vA-AU

Sane Intellij Plugin Development With Live Plugin (23 min)🧩
https://dmitrykandalov.com/liveplugin

System wide unique nanosecond timestamps (4 min)⏱️
http://blog.vanillajava.blog/2021/12/system-wide-unique-nanosecond-timestamps.html

Go, Go, GraalVM with Spring Native: My Adventures in Native Image-ville (5 min)🧉
https://spring.io/blog/2021/12/29/go-go-graalvm-with-spring-native-my-adventures-in-native-image-ville

Best practices for writing code comments (10 min)💬
https://stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/
How to Design a Website in 2022
Published: 2022-01-05 13:03:33

How would you describe yourself? Are you a designer or a developer? Or maybe both?

Designers create visual elements such as logos, websites, apps, and other graphics. Developers build software programs and applications. Both designers and developers work together to create projects.

Whether you’re a designer or a developer, you should always consider your audience before creating anything. The way you present information to your audience determines whether they’ll want to interact with your project. If you’re designing a logo, you might want to focus on aesthetics. If you’ve got a web page, you’ll want to focus on usability.

If you have no idea where to start, the best place is probably by doing some research. Find out what people are looking for when they visit a certain site. This will help you decide how you can make it easier for them to find what they need.

There are lots of different ways to design a website. You could use Adobe Photoshop or Illustrator to create images that tell a story. You could also use HTML5 to add interactive features to your website. You could even use CSS3 to give your website an aesthetic look.

You don’t have to be a professional designer to create beautiful visuals. In fact, many graphic artists use free online tools like Canva to create their own designs. These sites let you choose from hundreds of templates and fonts. It’s easy to customize any template so you can make it unique. You can find some [lifetime deals](https://curiousblogger.com/appsumo-deals/) on website builder that let you design your website within a few minutes even if you don't have any prior experience.

Make sure you make a list of all items which you want to include before you start designing your website.
Journey of  Major Cryptocurrency Bitcoin
Tags: cryptocurrency, bitcoin, crypto, binance
Published: 2022-01-05 12:55:18

In the crypto era, all entrepreneurs are more eager in investing in cryptocurrencies and NFTs in 2022!. Those early days of the crypto world were started with today's major cryptocurrency Bitcoin. 

[Bitcoin](https://en.wikipedia.org/wiki/Bitcoin) is a cryptocurrency, a digital asset invented to work as an element of trade that uses cryptography to regulate its creation and control, instead of depending on central authorities. 

On 3 January 2009, bitcoin came into existence with Satoshi Nakamoto mining the genesis block of bitcoin.

"Satoshi Nakamoto" is a pseudonym for the individual one who designed the original bitcoin protocol in 2008 and established the network in 2009. Nakamoto was liable for developing the majority of the authorized bitcoin software and was enthusiastic in creating mutations and publishing technical information on the bitcoin forum.

All along with bitcoin's history, it has experienced rapid growth to evolve an influential currency both on- and offline. In the mid-2010s, enterprises began acknowledging bitcoin besides traditional currencies. As per the latest CoinMarketCap reports Bitcoin's total value is $887 billion.

Bitcoin has officially crossed 13years since its genesis block was mined.

On Twitter, the former first lady Melania Trump has congratulated Bitcoin's Satoshi Nakamoto for his invention.

Even Melania launched her range of NFTs last month on the Solana blockchain. At the time, she conveyed the collection "illustrates her passion for the arts."

On the end-of-year 2021, and forecast report for 2022, said that trading firm QCP Capital informed a “flippening” in the investor sphere from retail to institutional.

The crypto ownership is flippening from retailers towards organizational. 

Binance adds 66,000 BTC in December due to the traders moving towards key players like the Binance exchange. With the major cryptocurrencies moving towards key players. there is a trend shift for the short-term in contrast to the Buy-in on the exchanges balances. 

The cryptocurrency exchanges like Binance and OKEx have resulted in increased inflows of BTC. According to Coinglass reports, Binance is up 840 BTC as of the end of December, while OKEx has seen 767 BTC inflows.

On the December 2021 monthly view, Binance has high inflows, over 66,000 BTC then the end of November. Binance is very remarkable among the other cryptocurrency exchange in the global market. More and more people are interested in investing in cryptocurrencies. 

The cryptocurrency exchange business would best fit plan in the 20222. New cryptocurrency exchanges are emerging in the markets with ideal business plans. one can start their cryptocurrency exchanges business with a readily available source like a [Binance clone](https://www.cryptocurrencyscript.com/binance-clone).
Swift - Error handling
Tags: swift, beginners, programming, tutorial
Published: 2022-01-05 12:53:05

An error (exception) is an unexpected event that occurs during program execution. For example,

```swift
var numerator = 10
var denominator = 0

// try to divide a number by 0
var result = numerator / denominator // error code
```
## Steps For Error Handling in Swift

1. Create an enum that represents the types of errors.
2. Create a throwing function using the throws keyword.
3. Call the function using the try keyword.
4. Wrap the code with try in the do {...} block and add the catch {...} block to handle all errors.

Example,
```swift
// create an enum with error values
enum DivisionError: Error {

  case dividedByZero
}

// create a throwing function using throws keyword
func division(numerator: Int, denominator: Int) throws {

  // throw error if divide by 0
  if denominator == 0 {
    throw DivisionError.dividedByZero
  }
    
  else {
    let result = numerator / denominator
    print(result)
  }
}

// call throwing function from do block
do {
  try division(numerator: 10, denominator: 0)
  print("Valid Division")
}

// catch error if function throws an error
catch DivisionError.dividedByZero {
  print("Error: Denominator cannot be 0")
}
```
## Disable Error Handling
In Swift, sometimes we can be confident that the throwing function won't throw an error at runtime.

In that case, we can write try! during the function call to disable the error handling. For example,

```swift
enum DivisionError: Error {
  
  case dividedByZero
}

func division(numerator: Int, denominator: Int) throws {
  if denominator == 0 {
    throw DivisionError.dividedByZero
  }
    
  else {
    let result = numerator / denominator
    print("Result:", result)
  }
}

// disable error handling
try! division(numerator: 10, denominator: 5)
```
Start to Learn NEW language for APK
Published: 2022-01-05 12:52:11

Many people have no idea how to learn a new language, and they still feel the need to pursue it. You can easily begin learning a new language of your choice through self-study. However, you may find it difficult to find any books or resources that teach you any specific languages – so I put together this list with the best websites and apps that can help you when learning a new language.
"Learn Spanish & English Free" is an online language learning resource that has many mobile apps available for download. It allows you to learn Spanish and English both written and spoken. Although the app is free, it does have a premium upgrade which also lets you speak Spanish directly to your Android device with the use of SpeedTalk speech-to-speech technology.
This [website](https://www.olehanakorea.com/) provides a tutor program that teaches the basics of 20 languages used around the world.
Forem AWS user access is too high
Published: 2022-01-05 12:47:40

Hi, everyone; I just tried the tutorial for deploying a self-hosted instance of forem (https://github.com/forem/selfhost) on AWS. A step in the tutorial asks for the creation of an AWS user with  Programmatic access called forem-selfhost with the following 
* AmazonEC2FullAccess,
* AmazonS3FullAccess,
* AmazonVPCFullAccess.
I think there is a problem with the  privilege level here; it is too high! Is there any other way to create this used with lower access privileges?
What's your new year resolution (2022 edition)? 🎉 🥳
Tags: discuss, programming, career, productivity
Published: 2022-01-05 12:44:54


New year and new us! What are your new year resolution? In private life and in career? What do you plan to learn, to do or to experience this year? Share it with others and seal the stick-to-the-plan contract with community! ;)

> To improve is to change; to be perfect is to change often. 
> ~ Winston Churchill
3 surprising perks of having a podcast
Tags: podcast
Published: 2022-01-05 12:01:53

Hey there and happy new year! My name is Tiago and I am the host of the [Wannabe Entrepreneur podcast](https://wannabe-entrepreneur.com/episodes). I started this podcast in June of 2021 and have released already more than 175 episodes and interviewed more than 30 entrepreneurs.

**I did not plan to start a podcast**

Starting my podcast was something very spontaneous but quickly became a routine. A way for me to vent my feelings and organize my ideas. But I have to say that there are definitely hidden perks of hosting a pod...

**1- Free Mentorship**

Thanks to my podcast I was able to interview and ask questions to entrepreneurs like [Arvid Kahl](https://wannabe-entrepreneur.com/episodes/164) or [Tibo]( https://wannabe-entrepreneur.com/episodes/122). These are extremely busy entrepreneurs and a lot of people would pay big money for a chance to speak 101 with them for a whole hour... My podcast does not even have a big audience but just the fact of hosting one is already a great argument to convince these experts to share their time with you.

**2- Great Marketing Channel**

I don't do any external ads on my podcast or have sponsorships. I would love to keep the wbe ads free. Instead, I use my podcast as a marketing tool for my own projects. For example, by becoming a WBE member, listeners gain access to my  [virtual co-working space for bootstrappers](https://wannabe-entrepreneur.com/coworking). This has proven to be surprisingly effective because your listeners already know you and want to be part of your projects.

**3- Forced Reflection**

Every Tuesday I release an episode about my own journey which motivates me to write down my thoughts during the week and reflect on them before each episode. This is great because it "forces" me to stop the autopilot mode and reflect if I am going in the right direction... After releasing the episode I often get feedback and helpful tips from my listeners that help me steer the week ahead.
It's also helpful to go back to older episodes and see what I have learned and what predictions and thoughts were wrong...

So here you have it, 3 surprising perks of having a podcast, I speak more about this in [my latest episodes](https://wannabe-entrepreneur.com/episodes/179/) or you can start by checking out [episode number 1](https://wannabe-entrepreneur.com/episodes/1/)

Cheers
highsea : color shades generator for tailwindcss - #2 : now with darkmode and palette builder
Tags: tailwindcss, webdev, svelte, javascript
Published: 2022-01-05 11:56:33

New features added to [highsea](https://highsea.nostrorom.com) - a color shade generator for tailwindcss.

### Darkmode

Your eyes will probably be grateful. The palette background is black - while it may be a bit intense, a color-neutral neighbour is necessary to better judge the shades.

For the same reason, the palette background is white in lightmode.

### Palette builder

In the first version of _highsea_, you could only get the hex the codes for one given color at a time.

The palette builder allows you to add/remove your custom colors, as well as the tailwind default colors so that you can choose your full palette right here and copy all the codes. 

Grays are not (yet) customizable, but they're included for reference if you want to see them next to your other colors - same goes for black and white.
IS YOUR HP PRINTER NOT PRINTING? HERE’S HOW TO FIX IT!
Tags: hpprinternotprinting
Published: 2022-01-05 11:28:41

An HP printer not printing is a common issue which users face quite often. There are ample reasons why this issue occurs and there are many ways to fix it. Before applying any of the methods to solve the issue, it is important to figure out the root cause of the error. When your HP printer is not printing, it is because of the following reasons:
1.	Missing or out-of-date drivers
2.	Faulty connections
3.	Incorrect configuration of Windows
View Source- https://ebeel.com/blogs/75231/IS-YOUR-HP-PRINTER-NOT-PRINTING-HERE-S-HOW-TO
Top 4 Web Design Trends For 2022
Tags: webdev, wordpress, mobile, design
Published: 2022-01-05 11:13:45

The web designers community conveys new trends every year with better user experience and [services](https://ritikkachhot.com/cheap-web-design-services/). These web design trends also include well-improved old design trends.

The main aim is to deliver a delightful [user experience](https://ritikkachhot.com/ux-ui-design-trends-and-inspiration/) and accessibility. Therefore, here are the top web design trends you should follow in 2022.

## <u>Scrollytelling</u>
One of the most effective web design trends is the scrollytelling effect. I love this visual design development because Scrollytelling increases the user spending time on the website.

The scrollytelling effect with big typography is worth trying for [portfolio website](https://ritikkachhot.com/best-personal-website-ideas-with-examples/). It is also trending in the web designer community nowadays.

## <u>Multilayers content</u>
For the past few years, designers focusing on minimalist and clean website design. Still, the multilayers content is ruling the design trends.

Just like storytelling, multilayers also gives better visuality and user experience. Therefore, users stuck with your website content.

## <u>Typography animations</u>
After the scrollytelling, typography with animation is the best website design combo. This web design trend gives stunning visual effects and accessible functionality.

By using retro fonts, image filters and colour gradients, you can give extraordinary web design services for the client.

## <u>Glassmorphism</u>
Glassmorphism is the stunning trend for this year. The blur and movement transparancy makes the design more cool and attractive. You can use this effects in illustrations, logos and other elements.

The combination of blur, shadow and reflection creates this glassmorphism effect. It is also known as "frosted glass effect".

## <u>Final words</u>
That's it. Use these design trends while making the website for good user experience and outstanding look.
gosh - Run powershell and bash commands easly in go.
Tags: bash, go, showdev
Published: 2022-01-05 10:58:29

{% github abdfnx/gosh no-readme %}

> Run powershell and bash commands easly in go.

## Examples

### Run one command on both shell and powershell

```go
import "github.com/abdfnx/gosh"

// run a command
gosh.Run("git status")

// run a command with output
err, out, errout := gosh.RunOut("whoami")

if err != nil {
  log.Printf("error: %v\n", err)
  fmt.Print(errout)
}

fmt.Print(out)
```

#### How `gosh.Run("COMMAND")` works ?

```go
// `Run` executes the same command for shell and powershell
func Run(cmd string) {
	err, out, errout := ShellOutput("")

	if runtime.GOOS == "windows" {
		err, out, errout = PowershellOutput(cmd)
	} else {
		err, out, errout = ShellOutput(cmd)
	}

	if err != nil {
		log.Printf("error: %v\n", err)
		fmt.Print(errout)
	}
	
	fmt.Print(out)
}
```

### Powershell

```go
import "github.com/abdfnx/gosh"

// run a command
gosh.PowershellCommand(`Write-Host "hello from powershell"`)

// run a script
gosh.PowershellCommand(`
  $git_username = git config user.name
  
  Write-Host $git_username
`)

// run a command with output
err, out, errout := gosh.PowerShelloutput(`[System.Environment]::SetEnvironmentVariable("Path", $Env:Path + ";$APP_PATH\bin", [System.EnvironmentVariableTarget]::User)`)

if err != nil {
  log.Printf("error: %v\n", err)
  fmt.Print(errout)
}

fmt.Print(out)
```

### Bash/Shell

```go
import "github.com/abdfnx/gosh"

// run a command
gosh.ShellCommand(`echo "shell or bash?"`)

// run a script
gosh.ShellCommand(`
  mood="👨‍💻"

  if [ $mood != "😪" ]; then
    echo "still coding"
  fi
`)

// run a command with output
err, out, errout := gosh.Shelloutput(`curl --silent "https://api.github.com/repos/abdfnx/resto/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'`)

if err != nil {
  log.Printf("error: %v\n", err)
  fmt.Print(errout)
}

fmt.Print(out)
```

> thank you for your time and don't forgot to star the repo if you like it