Programming Tips 💡 – Telegram
Programming Tips 💡
51.6K subscribers
67 photos
10 videos
30 files
355 links
Programming & AI:
Tips 💡
Articles 📕
Resources 👾
Design Patterns 💎
Software Principles

🇳🇱 Contact: @MoienTajik

🎯 Buy ads: https://telega.io/c/ProgrammingTip
Download Telegram
Media is too big
VIEW IN TELEGRAM
Creating a Responsive website using Boostrap Studio Tutorial ⚜️
What the f*ck JavaScript? 🤷🏻‍♂️

A list of funny and tricky JavaScript examples :
https://github.com/denysdovhan/wtfjs

#JavaScript #Fun
@ProgrammingTip
55 Checkboxes With Online Demo & Source Code 👾

http://freefrontend.com/css-checkboxes/

#CSS #UI
@ProgrammingTip
The Majesty of Vue.js.pdf
9.5 MB
The Majesty of Vue.js 📕
Author : Alex Kyriakidis 🖊

Simple explained 🙇🏻

#Book #Vue #JavaScript
@ProgrammingTip
Measuring Time 🕰

Many applications require a very precise time measurement. For this purpose, Java provides static methods in System class. 🔆

1️⃣ - currentTimeMillis(): Returns current time in MilliSeconds since Epoch Time, in Long.
view sourceprint?

long startTime = System.currentTimeMillis();
long estimatedTime = System.currentTimeMillis() - startTime;


2️⃣ - nanoTime(): Returns the current value of the most precise available system timer, in NanoSeconds, in long.

nanoTime() is meant for measuring relative time interval instead of providing absolute timing.

long startTime = System.nanoTime();
long estimatedTime = System.nanoTime() - startTime;


#java #time
@ProgrammingTip
#Fun NPM Delivery
Android Asset Studio 🛠

A web-based set of tools for generating graphics and other assets that would eventually be in an Android application's res/ directory.

Launcher icons
Action bar icons
Notification icons
Generic square icons
Simple nine-patches

https://jgilfelt.github.io/AndroidAssetStudio/

#Android #Tools
@ProgrammingTip
HTML5UP 💎

Attractive HTML5 Templates for Free 💯

https://html5up.net/

#Theme #Template
@ProgrammingTip
A.W.E.S.O.M.O 🤖

A big list of really interesting open source projects, for more than 18 programming languages.

https://github.com/lk-geimfari/awesomo

#OpenSource
@ProgrammingTip
JavaScript Clean Code 🛠

Use meaningful and pronounceable variable names 💡

Bad :
const yyyymmdstr = moment().format('YYYY/MM/DD');


Good :
const currentDate = moment().format('YYYY/MM/DD');


#JSTips #CleanCode
@ProgrammingTip
JavaScript Clean Code 🛠

Use default arguments instead of short circuiting or conditionals 💡

Bad :
function createMicrobrewery(name) {
const breweryName = name || 'Hipster Brew Co.';
// ...
}


Good :
function createMicrobrewery(breweryName = 'Hipster Brew Co.') {
// ...
}



#JSTips #CleanCode
@ProgrammingTip
JavaScript Clean Code 🛠

Use explanatory variables 💡

Bad :
const address = 'One Infinite Loop, Cupertino 95014';

const cityZipCodeRegex = /^[^,\\]+[,\\\s]+(.+?)\s*(\d{5})?$/;

saveCityZipCode(address.match(cityZipCodeRegex)[1], address.match(cityZipCodeRegex)[2]);


Good :
const address = 'One Infinite Loop, Cupertino 95014';

const cityZipCodeRegex = /^[^,\\]+[,\\\s]+(.+?)\s*(\d{5})?$/;

const [, city, zipCode] = address.match(cityZipCodeRegex) || [];

saveCityZipCode(city, zipCode);



#JSTips #CleanCode
@ProgrammingTip
JavaScript Clean Code 🛠

We will read more code than we will ever write. It's important that the code we do write is readable and searchable.💡

Bad :
// What the heck is 86400000 for?
setTimeout(blastOff, 86400000);


Good :
// Declare them as capitalized `const` globals.
const MILLISECONDS_IN_A_DAY = 86400000;

setTimeout(blastOff, MILLISECONDS_IN_A_DAY);



#JSTips #CleanCode
@ProgrammingTip
JavaScript Clean Code 🛠

Don't add unneeded context 💡
If your class/object name tells you something, don't repeat that in your variable name.

Bad :
const Car = {
carMake: 'Honda',
carModel: 'Accord',
carColor: 'Blue'
};

function paintCar(car) {
car.carColor = 'Red';
}


Good :
const Car = {
make: 'Honda',
model: 'Accord',
color: 'Blue'
};

function paintCar(car) {
car.color = 'Red';
}



#JSTips #CleanCode
@ProgrammingTip