Kselax.ru

Hacker Kselax – the best hacker in the world

Menu
  • Blog
  • Contacts
  • wp plugin generator
  • English
    • Русский
Menu
performance

Organization your folders and files for increasing performance

Posted on 4 June, 20185 July, 2018 by admin

Prerequisite
Describe our problem
What we can do to be more efficient in “this wild world”?
Wonder is occurred, what next?
What I’m going to do and suggested you doing?
Discover newly opened a very big problem relate to php
so called “Our own php lib”
Speaking about a general approach to reuse code for all languages
My conclusion for a while

Hello! Today we are going to overview such an intimate them like ‘Organize your files and folders’ for reusing code in the future. What is this? Why this is so important?

Prerequisite

Recently, I’ve noticed that I can’t find anything in my folders, cod that I did before I can’t reuse now and always suffering to create new before created code. Is it good when you walk on the same palace? And yes you are walking in the same place when you recreates created code.  I don’t know exactly what to do, it seems to be many approaches to solve this problem, but in general we works with many different things, with many different apps, how we could remember all of their settings? How?  I have many questions without answers…. I will I had them earlier…. Well guys, life is suffer anyway. We will try solving this problem. Let’s at first describe our problem to better understand circumstances.

Describe our problem

WE are have to work with php, mysql, css, node.js, wordpress, mails server with its big number of different app, LAMP, linux, many linux apps…. etc. Even your best editor, or each editor has his out diverse settings, How are you going to memorize all of this? Guys I’m not insisting on  you should research this domain, not any drop. Simply you can read requirements for developers or programmers and there is long list with you have to know…. How you will know all of these? Memorize everything? It’s impossible. It’s deviation from our main threads, return back 😉

What we can do to be more efficient in “this wild world”?

Base on my recent experience, I can surely say that good structure work. I’d never use /Document folder before. Now I’ve used it a few months and it’s usage brings me this on my stupid mind. Lets explain you. I created in /Document folder /apps where I put other folders that is named by name of application, like vim apps I created folder /vim and put there file there I recite all command vim and when I forget some command I easy go there and recall need information. Isn’t it a wonder? Guys it’s a really wonder. I don’t know what to say, Have only emotions 🙂 … And as well I use this folder for other apps and looking forward to adding there even more apps and modernize structure.

Wonder is occurred, what next?

I don’t know… How to live now after this experience? I’m understand that I’m a creeping creature…. Well.. Let’s I’ll draw you all my structure:
/Documents
—/apps
——-/vim (inside file with command description)
——-/bash (inside folder /sed and /awk and file with important details)
——-/mail-server ( there again many files where describes how to customize it, etc)
……
……

Gues, and etc…

What I’m going to do and suggested you doing?

I’m going to use this and do something for programming languages. For applications it’s nice. for programming languages might not because there is source code and more features. Take php as an example, this has his own configuration. We need some important details  that we don’t have to remember but we have rapidly to recall them. Something like path to php.ini (you can use phpinfo() and see it certainly) how to set up error_log, what some php settings are, etc. Php has many settings. It is sane to put them to our /Document/apps. And what else does php has? Sources many sources. This is very big problem for any languages.

Discover a newly opened very big problem relate to php

So far was so good, but we discovered  that php has beside app settings ( I mean configurations setting ) has source files code, that is very important, We’re documenting configurations and features in /Document/apps and what can we do with sources? It’s very difficult to answer… Exists many ways to solve this challenge. I see only one that we could apply and which seems to be effective enough it’s to create your own php lib. How will be it going on? Reusability php is implied to use OOP style it’s classes, etc. But not only this, functions are also well reusable. I think we need to have our own php lib and we won’t have a problem.

So called “Our own php lib”

Our own php lib. It’s thing is supposed to be powerful and to give you a big authority on this shitty world. Did you google recently? I noticed many people use some their own tool and hey enough successful. Obviously, our php lib will lead you to a success. I offer you to have such a file structure for php lib:

/my_php_lib
—/functions (folder with functions)
—/classes (folder with classes)
—loader.php (file that load automatically all classes and functions)

simply structure with endless possibilities…
I am fascinated…
Really didn’t expect I could come up such a structure…
but calm down and keep yourself 🙂

Well guys, do you see that structure? When we work with php we should include this structure to any project and work with this structure. All new classes will be stored in your libs and you won’t lost and drop of code. Nice.. Nice and again very nice. Might I am a master…

Speaking about a general approach to reuse code for all languages

This is about php was a short introduction in reusability of code, each language that allows using functions for him could be created your own functions lib. Functions lib is associated with an unlimited power. Shell scripts have only functions and I used it for while time and not bad, functions are easy to use, simple and straightforward. (…Sometimes I’m thinking about WordPress and its structure code OOPless… )

Shortly in general for each programming language we can create function libs and reuse code. I have to ask you. Do you have your own “function lib” yet? I would say no, I don’t. A Pitiful life…From this day I will have. We are all must have, There is no posing doing programming without our libs.

little overview on nodejs, css, html, javascript, bash.
-node.js support modules, here we can create our module and put functions.  and then include require
-css I don’t know what to apply here. Save on /document/apps details what some selector mean or others important thing. yes, and here could be lib as well, some file with styles, it even easier that programming languages, you do all in one file. include to all your project this style.css and with time you will have your own css lib – a fullfladget framework.
-javascript has function and difficult to include, This thing as css can be only determined in one big file, but again your javascript lib is like css simple lib. How you to include jQuery in your project? Right, simply include one file. Your own reusable lib should be equal.
-jQuery as well as for javascript
-for bash we create lib of functions
-about C++ it looks like decent developer can’t work there with libs

My conclusion for a while

I don’t know exactly but we need to structure our files. Mes is not facilitate a speedy search.
I’ll try to do my own structure, and surely to report you.

Waite a continue!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • bash (1)
  • English (9)
  • JavaScript (4)
  • node.js (22)
  • photoshop (1)
  • php (3)
  • React (9)
  • sclerotic (6)
  • Ubuntu (10)
  • Uncategorized (13)
  • Wordpress (1)

Tags

Ajax apache2 automation bash chrome-extension command line editor ejs email English English-grammar framework functions git graphql handlebars hybrid app installation javascript js linux newbie node.js node.js javascript nodemailer npm objects Performance php phpmyadmin playonlinux promise rabbitmq React react-router redis reverse-proxy session shell socket.io sublime text 3 time zones ubuntu unity webpack

Recent Comments

  • damien on How to install npm and nodejs the latest versions on ubuntu
  • Cam on How to install npm and nodejs the latest versions on ubuntu
  • Pierre on socket.io with apache as a reverse proxy on the CentOS
  • admin on How to use react-router with a few languages
  • admin on How to install npm and nodejs the latest versions on ubuntu
©2021 Kselax.ru Theme by ThemeGiant