lievikoff

lievikoff

Member Since 4 Months Ago

Experience Points 11,960
Experience
Level
Lessons Completed 116
Lessons
Completed
Best Reply Awards 0
Best Answer
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

11 Aug
4 months ago

lievikoff left a reply on Instantiating Objects

@youkaihiei thanks. Are there benefits of passing as arguments?

10 Aug
4 months ago

lievikoff left a reply on Instantiating Objects

@PatrickL Thank you for your reply. The code is just an example of the approx implementation. That is more a code design question. I am not sure what is the best OOP approach when you build classes.

lievikoff started a new conversation Instantiating Objects

I am confused with instantiating object in PHP.

I have this files:

  • Index.php (Actually WordPress plugin's main file but let's stick with index.php)
  • autoloader.php (A custom autoloader because of custom standards)
  • src/Plugin.php (It supposed to have everything i need for the core like versions, paths etc)
  • src/FrontendScripts.php (It extends a Scripts class and implements a Hook interface)
  • src/BackendScripts.php (It extends a Scripts class and implements a Hook interface)

In index file i do:

$autoloader = new Autoloder();
$autoloader->register();

// so here i can use any of those classes without require them manually.

$plugin = Plugin::getInstance();

$frontend_scripts = new FrontendScripts( 'app', 'test' ); // list of script names that should be registered

$backend_scripts = new BackendScripts( 'admin' ); // the same as for frontend

What is the best practice of instantiating those FrontendScripts and BackendScripts objects? Should i pass them to the main plugin class as args? Should i just make instances inside the Plugin class without any arguments passed to the main class?

lievikoff left a reply on 15" MacBook Pro Alternatives

I got a MBP 13" - that is a perfect machine for coding. I don't feel like i need more display space. Thank you all for replies.

30 Jul
4 months ago

lievikoff started a new conversation How Do You Deal With Project Structure, Naming, And Code Organizing As Well?

Hi.

I always have problems with structure my projects or naming files/methods/functions. This happens because i want to keep it as much maintainable as possible. I had experience in supporting some projects that should be long term but they created on a knee and not by me. I know how terrible might be supporting those bad smell code. I caught myself spending a lot of time thinking about how to structure a project or name methods.

I assume that happens because of missing experience in code design or useless perfectionism.

How do you deal with that? Are there any good books you can recommend about code design or how to get rid of code perfectionism?

A quick example:

I am currently working on a WordPress Plugin that supposed to work with ReactJS. And here it goes...

Should i make src/dist folders or just keep things like assets/js assets/jsx assets/css assets/scss and then exclude those sources folders from a production version etc.

28 Jul
4 months ago

lievikoff left a reply on MacBook Pro Alternatives

@brightstormhq I had never seen MBP 13" in real life so thank you for sharing your experience! I will try and get one.

lievikoff left a reply on MacBook Pro Alternatives

@ohffs thank you. Then i will just buy a MBP 13".

lievikoff left a reply on MacBook Pro Alternatives

@brightstormhq I agree with you about MBP 13" power. That is quite enough for me. The only thing i am not sure is the screen size. Do you think 13" would be enough for coding without an external monitor? Unfortunately, where i live, there is no apple store to see it in real life and test.

27 Jul
4 months ago

lievikoff started a new conversation MacBook Pro Alternatives

Hi!

I used to work on MacBook Pro 15” but it is no longer with me. Unfortunately, I don’t have enough money to buy a new one.

Maximum what I can buy is MacBook Air 13” minimal specification.

Should I give up on Mac OS and love windows?

Is there possible alternatives for budged in $1000?

The main requirements:

  • a nice screen
  • not a crazy touchpad which is most not apple laptops have
  • keyboard that not “crying” when typing
  • SSD
21 Jul
4 months ago

lievikoff started a new conversation Namespaces In PHP And The Same Name Classes

Hi. Could you please help me understand best practice of naming classes in PHP using namespaces?

Example: We have two classes called the same - "Assets" but they have different namespaces: App and App/Admin.

Code:

  • app/assets.php (supposed to enqueue frontend assets):