Tech Rumors
3 subscribers
235K photos
239K links
Download Telegram
cointelegraph.com

Crypto community reacts to mainstream media coverage of FTX’s implosion: criticism, misogyny and more
The crypto community has criticized Forbes magazine for dubbing Caroline Ellison “Queen Caroline” and “a new darling of the alt-right.”


dev.to

Code Smell 180 - BitWise Optimizations
Bitwise operators are faster. Avoid these micro-optimizations

TL;DR: Don't use bitwise operators unless your business model is bitwise logic.



Problems

Readability
Clevereness
Premature Optimization
Maintainability
Bijection Violation



Solutions

Improve readability



Context

Some clever programmers solve problems we don't have.

We should optimize code based on evidence and use the scientific method.

We should benchmark only if necessary and improve code only if really necessary and bear the cost of changeability and maintainability.



Sample Code



Wrong

const nowInSeconds = ~~(Date.now() / 1000)



Right

const nowInSeconds = Math.floor(Date.now() / 1000)



Detection

[X] Semi-Automatic

We can tell our linters to warn us and manually check if it is worth the change.



Exceptions

Real-time and mission-critical software.



Tags

Premature Optimization



Conclusion

If we find this code in a pull request or code review, we need to understand the reasons. If they are not justified, we should do a rollback and change it to a normal logic.



Relations








Code Smell 20 - Premature Optimization
Maxi Contieri ・ Nov 8 '20 ・ 2 min read

#oop
#developing
#coding
#codesmell











Code Smell 165 - Empty Exception Blocks
Maxi Contieri ・ Sep 24 ・ 2 min read

#webdev
#beginners
#programming
#python











Code Smell 06 - Too Clever Programmer
Maxi Contieri ・ Oct 25 '20 ・ 2 min read

#codenewbie
#tutorial
#beginners






More Info

Tilde Operator ~~

Javascript BitWise Operators



Disclaimer

Code Smells are just my opinion.



Credits

Photo by Frédéric Barriol on Unsplash

Original Article Here.

Watch the little things; a small leak will sink a great ship.

Benjamin Franklin








Software Engineering Great Quotes
Maxi Contieri ・ Dec 28 '20 ・ 13 min read

#codenewbie
#programming
#quotes
#software




This article is part of the CodeSmell Series.








How to Find the Stinky parts of your Code
Maxi Contieri ・ May 21 '21 ・ 8 min read

#codenewbie
#tutorial
#codequality
#beginners
#webdev #javascript #beginners #programming


theverge.com

Wickr’s free encrypted messaging app is shutting down next year
Illustration by Alex Castro / The Verge


Wickr Me, the free encrypted messaging app owned by Amazon Web Services, is shutting down on December 31st, 2023. In a post on its website, Wickr says the app will stop accepting new user registrations on December 31st, 2022 before going away completely next year.
cointelegraph.com

Bitcoin’s new ‘worst case scenario’ puts BTC bear market bottom near $6K
Bitcoin capitulation action could send BTC price back to an area double the 2018 bear market bottom, says Decentrader’s Filbfilb…
#Bitcoin #BTCpriceprediction #analysis


dev.to

1. Rust GUI and GTK calc
Introduction

I’ve started to learn rust GUI and GTK probably in june 2022. All this time I tried to get a job (and still trying) and was doing some tests tasks which took some time. And september was something like no-code month for reasons.
I found GTK documentation for Rust is pretty weird sometimes. I just had to google instead of reading docs. Some answers I found on the old forums, some I got by myself. Anyway I like the fact I can write at least something simple. It was interesting and I’…
#rust #gui #beginners

2. Connecting PostgreSQL with python sqlalchemy orm.
In this tutorial I will show you how to create a CRUD script by using python sqlalchemy orm.python is a multipurpose and most popular language in the world. when writing a python script, we need to store data in a different database. Sqlalchemy, best orm for python, can help us to connect with a different type of SQL database however I this tutorial I will show you how to create CRUD script by using PostgreSQL database.

Let’s assume you already know python virtual environment and you already in…
#python #django #devops #webdev

3. 9-JS OOP: Getters And Setters In Javascript Classes
What are Getters and Setters?

Getters and setters are methods that are used to get and set the value of a property member in a class.

So a getter method is a method that is prefixed with get keyword, and it allows us to get a certain value when a user tries to access that getter property.

An example of a getter method:

class Human {
private _name: string = 'Hasan';

get name() {
return this._name;
}
}

Here we defined get name() this is a getter method, it allows us to return whatever we…
#javascript #oop #typescript


theverge.com

The Galaxy Z Fold 4 is the most versatile gadget you can buy
The size of the Fold 4’s inner display changes how you think about what a smartphone can do. | Photo by Allison Johnson / The Verge

It’s easy to see the appeal of folding phones — they are big screen devices that get smaller to fit in your pocket. It’s also easy to see the drawbacks; as much as Samsung tries to hide it with trade-in promotions, there’s no denying the Galaxy Z Fold 4’s $1,800 price tag is too steep for the vast majority of people. The question of durability is also hard to igno…
cointelegraph.com

Canada crypto regulation: Bitcoin ETFs, strict licensing and a digital dollar
The first and the last major attempt to encourage a comprehensive crypto framework was buried in the House of Commons on Nov. 23…
#Canada #Law #Government #ETF #BitcoinPrice #BitcoinRegulation #NorthAmerica #UnitedStates


dev.to

1. Map, Reduce, and Filter - JS Array Functions Explained with Code
Each one will iterate over an array and perform a transformation or computation. Each will return a new array based on the result of the function

Map function

map() method creates a new array with the results of calling a function for every array element.

const output = arr.map(function) // this function tells map that what transformation I want on each element of array

Task 1: Double the array element

const arr = [1, 2, 3, 4, 5];
// pass a function to map
const double = arr.map(x => x * 2)…
#javascript #webdev #beginners #programming

2. A Guide to the Most Popular Types of APIs: REST, SOAP, GraphQL, and gRPC
APIs are the most important component of the modern-day software development process, helping applications and services communicate and transfer crucial information.

However, with the advancements in the field, now there are various choices to go with: REST, SOAP, GraphQL, or gRPC. That means whether you are an application architect or a backend developer, it’s essential that you understand which APIs are the best suited to particular applications.

Each API type has its unique architecture, w…
#webdev #beginners #api #computerscience

3. Object Oriented Programming : The Beginner's Guide
Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. It allows you to break down complex problems into smaller pieces of code and reuse bits of code to save time in the long run.

In this post we will look at the following concepts of Objects Oriented Programming.

Classes
Objects
Abstraction
Encapsulation
Inheritance
Polymorphism

OOP Basics

Adopting object-orientated programming starts with learning to clearly identify objects and define the…
#oop #programming #beginners #java
dev.to

1. Modeling a Banking system in OOP
The beauty of Object-oriented programming is that any real-world system can easily be modeled with it. Using abstraction a complex system can be made simple and represented in code.

In this post, I will be modeling a Banking system and along the way, I will be introducing key concepts from OOP.

Abstraction

First of all, let's create an abstraction of the whole system. Banks have accounts that they manage for their clients. A client can create an account. These accounts have balances from whi…
#oop #programming #beginners #tutorial

2. 6 Ways to Delete a Property In JavaScript You Must Know
You might ask yourself how can I remove a property from a JavaScript object? I've found myself in this situation countless times.

In this article, I take you through 6 ways to achieve this. It's worth mentioning many of these techniques are exactly applicable even when you use a framework or at least you'll use a very similar approach there too.

Before we move on, remember you can build your websites, landing pages, APIs, and more, with or without coding on DoTenX for free. Make sure to check …
#javascript #webdev #beginners #tutorial
dev.to

1. Part 1: Introduction to Unit Testing (with examples)
Unit testing is a software testing technique in which individual units or components of a software application are tested in isolation from the rest of the system. The goal of unit testing is to validate that each unit of the software application is working as intended. A unit is the smallest testable part of an application, such as a function or a method.

For example, consider a simple function that takes two integers as input and returns their sum. A unit test for this function would involve …
#testing #beginners #programming #writing

2. Part 2: Catching Bugs Early
One of the main benefits of unit testing is that it allows developers to catch bugs early in the development process. By testing individual units or components of the software application, developers can identify and fix issues before they make their way into the final product. This can save a lot of time and resources compared to catching and fixing bugs later on in the development cycle or after the product has been released.

It’s important to write tests for edge cases as well as the most co…
#testing #beginners #programming #writing

3. Encapsulation, Inheritance, and Polymorphism: Understanding the Building Blocks of Object-Oriented Programming
Object-oriented programming (OOP) is a programming paradigm that uses objects and classes to represent real-world concepts. It is based on three key principles: encapsulation, inheritance, and polymorphism. These concepts are fundamental to the design and implementation of OOP languages such as Java, C++, and Python. In this article, we will use the analogy of building a house to explain these concepts and how they work together to create robust, efficient, and maintainable code.

Encapsulation…
#oop #programming #computerscience
dev.to

Mastering JavaScript's `this` keyword using `bind`
In JavaScript, you're able to use a class as a template for your objects: class Car { wheels =...
#javascript #oop #webdev #beginners
dev.to

Make your own jQuery from scratch
jQuery is one of the most popular JavaScript library . It greatly simplifies JavaScript programming....
#javascript #beginners #tutorial #oop
dev.to

Getting Started With Python's ABC
Originally Published on GeekPython.in What is the ABC of Python? It stands for the abstract base...
#oop #python #programming #tutorial
dev.to

Introduction to Object-Oriented Programming (OOP)
Object-oriented programming (OOP) is a popular programming paradigm that has gained widespread...
#javascript #oop #introduction #programming
dev.to

OOP and FP
OOP helps developers understanding complex system by modeling into real-world objects with properties...
#coding #programming #oop #mrcrystal
dev.to

What is the `new` keyword in JavaScript?
The new keyword in JavaScript is used to create new object instances from either: A constructor...
#javascript #oop #beginners #programming
dev.to

Javascript - OOP with Javascript
What is OOP? Object-oriented programming (OOP) is a programming paradigm that is based on...
#javascript #beginners #oop
dev.to

What, exactly, is Object-oriented Programming?
I'm going to be concise here, of course. First things first, Object-oriented Programming (or OOP,...
#programming #oop
dev.to

Practical Intro to Operator Overloading in Dart
Introduction Operator overloading is a quite powerful, popular, and common concept and...
#flutter #dart #oop #programming
dev.to

Decoupling in Java
Decoupling in programming means reducing the interdependence between the different components or...
#decoupling #java #oop #cleancode