Programming Tips πŸ’‘
51.6K subscribers
67 photos
10 videos
30 files
354 links
Programming & AI:
Tips πŸ’‘
Articles πŸ“•
Resources πŸ‘Ύ
Design Patterns πŸ’Ž
Software Principles βœ…

πŸ‡³πŸ‡± Contact: @MoienTajik

🎯 Buy ads: https://telega.io/c/ProgrammingTip
Download Telegram
Tests are part of source control βœ…

The test code you write needs to reside in a source control repository, just like your real production code.πŸ“¦

In fact, you should treat your test code as thoughtfully as you treat your production code. ↔️

It should be part of the branch for each version of the product, and it should be part of the code that developers receive automatically when they get the latest version. πŸ”š

Because unit tests are so connected to the code and API, they should always stay attached to the version of the code they’re testing.

#UnitTest
@ProgrammingTip
Renaming or Refactoring Tests ♻️

An unreadable test is more of a problem than a solution. πŸ‘ŽπŸΏ

It can hinder your code’s readability and your understanding of any problems it finds. ❌

If you encounter a test that has a vague or misleading name or that can be made more maintainable, change the test code. βœ…

#UnitTest
@ProgrammingTip
Unit Tests ⚜️

Tests are stories you tell the next generation of programmers on a project. βœ”οΈ

They allow a developer to see exactly what an application is made of and where it started.

#UnitTest
@ProgrammingTip πŸ’»
Creating ASP.NET Core Project βž• Angular 4, Vue, React ⚜️

1️⃣ First you need to download & install Node.js from here :
https://nodejs.org/en/

2️⃣ Then you need to install Yeoman Generator, run this command in cmd :
npm install -g yo


3️⃣ Then you need to install ASP.NET Core SPA Generator for Yeoman, run this command :
npm install -g yo generator-aspnetcore-spa 


4️⃣ Finally create a new folder ( Project Folder ) and navigate that with cmd and run this command :
yo aspnetcore-spa


After running this command, you can choose which client technology you want to use with ASP.NET Core like Angular, Vue, React, Aurelia & ...

#aspnet #core #angular
@ProgrammingTip
The compiler doesn't care whether the code is ugly or clean. πŸ€·πŸ»β€β™‚οΈ

But when we change the system, there is a human involved, and humans do care. πŸ™‹πŸ»β€β™‚οΈ

#CleanCode
@ProgrammingTip
Use Strings carefully ⚠️

If two Strings are concatenated using β€œ+” operator in a β€œfor” loop, then it creates a new String Object, every time.

This causes wastage of Memory and increases Performance time.

Also, while instantiating a String Object, constructors should be avoided and instantiation should happen directly. For example:

//Slower Instantiation ❌
String bad = new String("string object");

//Faster Instantiation βœ…
String good = "string object";


#memory #java #string
@ProgrammingTip
Avoiding Memory Leaks By Simple Tricks βœ…

Memory Leaks often cause performance degradation of software. Since, Java manages memory automatically, the developers do not have much control.

But there are still some standard practices which can be used to protect from memory leakages. πŸ™†πŸ»β€β™‚οΈ

1️⃣ - Always release database connections when querying is complete.

2️⃣ - Try to use Finally block as often possible.

3️⃣ - Release instances stored in Static Tables.

#java #memory #performance
@programmingTip
Bootstrap Studio πŸ…±οΈ

A powerful desktop app for creating responsive websites using the Bootstrap framework.

https://bootstrapstudio.io/

#Bootstrap
@ProgrammingTip
Bootstrap Studio 2.2.4 Professional Edition.exe
47.5 MB
Bootstrap Studio Version 2.2.4 Professional Edition πŸ“¦
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
JSF*ck πŸ€¦πŸ»β€β™‚οΈ

It's a programming style based on the atomic parts of JavaScript.

It uses only 6 different characters to write and execute code.

Try it one time 🀣

http://www.jsfuck.com/

#Fun #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