Andeska: Share, Discuss, Discover

Create blogs, engage in comments, and explore clubs, with easy API access to your content

Connect with others now

12 Rules for Life by Jordan Peterson: Simplified Summary

Life can be chaotic and confusing, but Jordan Peterson offers 12 simple rules to help you find meaning and direction. But remember, these are simplified versions of the original rules.

Rule 1: Stand Tall & Be Confident: Slouching sends bad vibes. Stand up straight, shoulders back, and make eye contact to feel and project confidence. It's like flipping a switch for your brain and life!

Rule 2: Treat Yourself Right: You wouldn't neglect a sick pet, so why neglect yourself? Take care of your health, mental well-being, and needs. You deserve it!

Rule 3: Choose Your Crew Wisely: The people you hang around with shape you. Surround yourself with positive, supportive folks who want you to succeed. Ditch the negativity!

Rule 4: Focus on Progress, Not Perfection: Comparing yourself to others is a recipe for misery. Instead, track your own progress and celebrate how far you've come. You're on your own journey!

Rule 5: Set Boundaries for Kids: Kids need clear rules to learn and grow. Don't let bad behavior slide, even if it's tough. You're helping them become responsible adults.

Rule 6: Fix Yourself Before Fixing the World: Can't complain about the world if your own life is a mess. Get organized, tackle your problems, and be the best version of you before criticizing others.

Rule 7: Find Your Purpose, Not Just Fun: Don't just chase instant gratification. Seek something meaningful that makes a difference, even if it's tough. It's more fulfilling in the long run.

Rule 8: Be Honest (with Yourself & Others): Lying, even to ourselves, holds us back. Find your true values and live authentically. You'll be happier and more respected.

Rule 9: Be a Good Listener: People need to be heard. Lend an ear and learn from others. It's a great way to help them and yourself!

Rule 10: Be Specific, Not Vague: Facing a problem? Don't avoid it. Clearly define it, break it down, and tackle it piece by piece. It's less overwhelming and more manageable.

Rule 11: Accept Reality, Not Fairy Tales: Life isn't always fair. Some people have advantages, others don't. Focus on what you can control and strive for excellence, not impossible equality.

Rule 12: Appreciate the Good Stuff: Life can be tough, but there's good too. Take time to appreciate the little things, like a friendly cat. It helps balance the bad and makes life worth living.

Show more

Understanding the Repository Pattern

What is the Repository Pattern? Repository Pattern is a design approach that separates data access logic from business logic. It's like having a personal assistant (the repository) who handles all the database-related tasks for your application.

Why Use It?

  • Simplicity: Keeps your controllers clean and focused on handling requests, not data management.
  • Maintainability: Changing how data is accessed or stored? Just update the repository, not every piece of your code.
  • Testability: Easier to test your application logic without worrying about the database.

How It Works:

Define an Interface: This outlines the functions your application needs to interact with the database.

Create a Repository Class: This class implements the interface and contains the actual code for data retrieval and storage.

Use in Controllers: Controllers use this repository to interact with data, keeping them neat and focused on handling user requests.

Example: Imagine a blog. You'd have a PostRepository to handle all database operations related to blog posts. Controllers call on this repository to get posts, create new ones, etc., without touching the database logic directly.
 

interface PostRepositoryInterface
{
    public function getPublishedPosts();
}
class EloquentPostRepository implements PostRepositoryInterface
{
    public function getPublishedPosts()
    {
        return Post::where('published', true)->get();
    }
}
class PostController extends Controller
{
    protected $postRepository;

    public function __construct(PostRepositoryInterface $postRepository)
    {
        $this->postRepository = $postRepository;
    }

    public function index()
    {
        $posts = $this->postRepository->getPublishedPosts();
        return view('posts.index', compact('posts'));
    }
}

Conclusion: The Repository Pattern in Laravel is all about organizing your code for ease of maintenance, testing, and clarity. It helps keep your application flexible and your code clean.

Show more

Speeding Up Your Server: Keep It in RAM!

Ever heard of keeping your server's tasks in RAM? It's a smart, speedy way to supercharge response times. Traditional server setups start from square one for each request, but with in-memory optimization, we keep the core server processes ready and waiting in RAM.

The Speed Advantage

RAM is lightning fast. Storing server's essential functions in RAM means we can skip the tedious start-up routine for every new request. It's like having a fast-food meal prepped and ready to go, rather than cooking from scratch each time.

Memory Overuse? Worth it!

Yes, it uses more RAM. But think about it: RAM is faster and more affordable than it used to. For busy websites and apps, this trade-off is the best way. Faster responses, happier users!

Wrap-Up

Keeping server operations in RAM: quick, efficient, a modern solution for speed. Give it a thought, and maybe give it a try! 🚀💨🖥️

Show more

Understanding Domains and Hosting

Your app is stored on a server, which you can think of as a powerful computer located somewhere. This server is identified on the internet by its IP address, which is a unique number like '164.92.251.81'. As you can see, IP addresses can be hard to remember, which is where domains come in. 

A domain, such as 'yoursite.com', is a user-friendly way to access your app on the server. Instead of typing in a complex numbers, you simply enter the domain name. It's like saving a phone number in your contacts under a name; you don't need to remember the number because you remember the name.


How to connect domain with server (DNS setup)?

  • Log in to the website where you registered your domain (like GoDaddy, Namecheap, etc.).
  • Navigate to the section where you can manage your domain.

2. Locate DNS Settings or DNS Management Area

  • This area allows you to manage various DNS records for your domain.

3. Change Nameservers (if necessary)

  • Nameservers control where your DNS records are managed.
  • If your hosting provider gave you specific nameservers, change them in your domain registrar’s panel.
  • They look sth like "ns1.digitalocean.com."

4. Add or Edit A Records

  • A Record: Stands for "Address Record" and connects your domain to the IP address of your hosting server.
  • Find the option to add an A Record and enter the IP address of your hosting server.
  • This directs your domain to your web hosting server when someone types your domain into a browser.

5. Setting Up a WWW Record

  • Why WWW Record: Some users may type www before your domain (like www.example.com). To ensure your site is accessible with or without www, you need to set up a record for it.
  • Typically, this is done with either a CNAME record.
  • CNAME Record for WWW: Points www.yourdomain.com to your main domain yourdomain.com.
  • A Record for WWW: Points www.yourdomain.com directly to your hosting server’s IP, just like your main domain.

6. Save Changes and Wait for it to work

  • After making changes, save them.
  • DNS changes require some time, typically up to 48 hours.

7. Test Your Domain

  • 1-2 days later, visit your domain in a web browser to ensure it points to your hosting server.
Show more

The Diary of a CEO: The 33 Laws of Business and Life

Here’s my review of Steve Bartlett’s book for a deep dive into his insights. If you’re looking for the complete picture, consider reading the book for yourself to get the full experience of his teachings.

Pillar 1: The selfFill your five buckets in the right order

  1. Knowledge. What you know and understand.
  2. Skills. How you apply what you know.
  3. Network. The people you know and can collaborate with.
  4. Resources. What you have in terms of assets and tools.
  5. Reputation. How the world perceives and values you.

To master it, you must create an obligation to teach it

Begin with points of agreement keeps the other person open to hearing your opinion

You don’t get to choose what you believe

So, is it possible to change our believes? To change what you believe, you basically need to think hard about why you believe what you do now and be open to learning new things that might make you see stuff differently. It’s like updating what you know by adding new info and dropping old ideas that don’t make sense anymore. This way, you start to see the world in a new way

You must lean in to bizarre behaviour

We should encourage ourselves to engage with changes, even if they seem strange or confusing, instead of rejecting them(ex: social media).

Ask, don’t tell — the question / behaviour effect

Instead of telling people what to do, we should ask them questions.

• Statement: “You need to improve your report submission times; they are always late.”

• Question: “Do you think you can commit to submitting your reports by the end of Thursday each week?”

Never compromise your self-story

It is about believing in your own story of who you are, which helps you keep going even when things get tough. It means every little thing you do helps build up a story in your head about what kind of person you are. So, if you keep doing positive things, you’ll start to see yourself as a strong person who can reach your goals.

Ex: Imagine you’re someone who wants to be seen as a good friend. You make it a point to remember birthdays, show up on time, and be there when your friends need you. Each time you do these things, you’re telling yourself the story that you’re reliable and caring, which makes you more likely to keep being that good friend in the future.

Never fight a bad habit

Instead of directly fighting against bad habits, you should try to change them by substituting the reward you get from the bad habit with a better one. Since habits consist of a cue, routine, and reward, by altering the reward to something positive, you can shift the habit to a healthier one. It’s also important to manage stress and get enough rest, as being tired can weaken your willpower, making it harder to change habits. Tackling one habit at a time helps to conserve willpower and avoid frustration.

Always prioritise your first foundation(heath)

By prioritizing health above all, you ensure that you can enjoy and succeed in other areas

Pillar 2: The StoryUseless absurdity will define you more than useful practicalities

Unique, unexpected, and even absurd aspects of your personality or business can be more defining and memorable than conventional, practical attributes. By highlighting these unique qualities, you can make a more significant impact and attract attention without the need for traditional marketing methods

Avoid wallpaper at all costs

To stand out and not just blend into the background, you have to be unique and avoid doing the same thing over and over; instead, aim to strike a balance between familiar and new to keep things interesting.

Ex: Imagine you’re launching a new brand of sneakers. Instead of advertising them as just another shoe with great features, you decide to send a pair to space and film their journey. This absurd, unique story grabs attention because it’s not what people are used to seeing from sneaker ads. This different approach sets you apart from the competition, and your sneakers become known as “the ones that went to space,” bypassing the need for a typical ad campaign and avoiding becoming just “wallpaper” in the sneaker market.

You must piss people off

The key is to be disruptive enough to be memorable but not so much that the shock value wears off.

Ex:

  • Product: A new smartwatch with a focus on privacy.
  • Marketing Tactic: Launch a campaign with the provocative slogan “Is Your Smartwatch Spying on You?” Use billboards and online ads with images of eyes on watch faces, stirring privacy concerns. It’s controversial, gets people talking, and directly challenges competitors’ privacy practices.

Shoot your psychological moonshots first

It means making tiny tweaks that make a big difference in how people see your service or product. Like, when Uber shows you your ride coming on a map, it makes waiting less annoying and you trust them more. These smart moves don’t cost much but can make people like and trust your brand a lot more

Friction can create value

This idea suggests that sometimes a product’s appeal can come from its not-so-pleasant aspects because they give the impression of effectiveness. For instance, the strong medicinal taste of energy drinks might make people think they’re packed with potent ingredients. It plays into the quirk of human behaviour where we don’t always make logical choices, and a product can be popular even if it seems to go against common sense. This can be a powerful tool in product design and marketing, leveraging the peculiar ways people make decisions to create a demand.

The frame matters more than the picture

Presentation of a product — its packaging or naming — can greatly affect how people perceive its value. Interestingly, sometimes adding a perceived value can paradoxically lower the psychological value of the product.

Use Goldilocks to your advantage

By offering a range of product options — cheap, standard, and premium — you set an anchor with the extremes and make the standard option appear more reasonable by comparison. This can effectively steer customers towards a particular choice by framing it as a balanced compromise between quality and cost.

Example:

A coffee shop offers three sizes: small ($2), medium ($3), and large ($5). The small seems like a bargain, the large feels indulgent, but the medium looks just right, so most people go for it thinking it’s the best deal.

Let them try and they will buy

People place a higher value on things because they own them or feel a sense of ownership.

Ex: Tech shops let you try gadgets because once you use them, you’ll likely value them more and want to keep them. This is the endowment effect — thinking something is worth more once it’s yours.

Fight for the first five seconds

Start your stories with a bang because you’ve only got five seconds to grab someone’s attention before they lose interest. Skip the boring intro and hit them with something exciting right away.

Ex: Mr Beast’s youtube videos

Pillar 3 :The philosophyYou must sweat the small stuff

This principle is at the heart of Japan’s kaizen, or “continuous improvement,” where steady, small improvements lead to big successes. It’s about not overlooking the small stuff because over time, those tiny, easy-to-ignore details can make or break a project.

A small miss now creates a big miss later

It is about how small efforts every day lead to big wins later, even if it means leaving a comfortable path now for a better one. It says that success isn’t just for geniuses; it’s for anyone who keeps trying to do better, even when it’s tough.

You must out-fail the competition

You should be willing to fail more to succeed more. Companies like Amazon thrive by making more mistakes than others, learning from them, and moving fast on decisions. Cut red tape, reward risk-taking, put the right people in charge, track what works, and be open about what doesn’t to keep getting better. It’s all about seeing failure as a step to success and not wasting time overthinking.

You must become a Plan-A thinker

Focus only on your main goal without distractions, as having a fallback plan (Plan B) can make you less driven to succeed. It’s about commitment to a single path and putting everything into making it work, instead of spreading your efforts thin over multiple possibilities.

Don’t be an ostrich

Avoiding problems doesn’t make them go away. It’s better to face tough situations head-on by recognising them, understanding your feelings, talking about the issues, and listening to others to learn and move forward.

You must make pressure your privilege

Pressure is a sign you’re doing important work and should be seen as a chance to improve. You can’t escape pressure, but you can change how it affects you by recognising it, sharing your stress with others, reframing it as a positive force, and using it to fuel your success.

The power of negative manifestation

Always ask “Why might this fail?” to spot problems early. We often don’t ask because we’re too optimistic, only listen to supporting facts, think we’re better than we are, don’t want to waste what we’ve spent, or don’t want to disagree with a group. Using a pre-mortem — thinking about failure before it happens — helps avoid these traps and can be used for decisions in work and personal life, like choosing jobs, partners, or investments. It’s about planning for problems before they happen.

Your skills are worthless, but your context is valuable

Skills alone aren’t inherently valuable; their worth is determined by what others are willing to pay for them. This value can depend on the demand for the skill, how rare it is, and the amount of value it brings to others. To increase a skill’s value, you might shift its application to different contexts where it’s more in demand, instead of picking up new skills. This approach underlines the importance of adaptability and understanding market needs.

The discipline equation: death, time and discipline!

Remembering our limited time can help us focus on what’s important and be disciplined. The “time betting” idea treats every hour as a chip in life’s gamble, where spending it wisely leads to rewards. To stay disciplined, the potential gains from your goals should outweigh the effort they require. This mindset encourages us to live fully, with an understanding that health can “buy” us more time, but ultimately, when our time runs out, we leave everything behind.

Pillar 4: The teamAsk who not how

Instead of figuring out how to do everything, you should find skilled people you trust and delegate tasks to them. This allows you to concentrate on what you do best and rely on others to handle the rest, making work more efficient and effective.

Create a cult mentality

Build a company culture that’s as dedicated as a cult but with independent thinking. Start with a passionate foundation, grow through challenges, find stability, and know that decline is natural. Have a clear mission and community feeling, with inspiring leadership and a sense of uniqueness. This makes a company culture strong and helps it last.

The three bars for building great teams

A team’s success is driven by its culture and values, which the leader should embody. A strong team culture means finding and keeping people who raise the bar with their values, attitude, and skills. It’s about not tolerating those who don’t fit the team’s standards and are willing to make the tough calls on personnel to protect the team’s integrity.

Leverage the power of progress

Making little improvements often, so you’ll keep feeling like you’re getting somewhere. It’s easier to keep going when you see regular progress from small changes rather than waiting for one big leap. To keep improving, enjoy your work, know your next step, let people choose their way to do things, make it easy to do, and cheer every success.

You must be an inconsistent leader

Leadership requires adaptability in approach and emotions to bring out the best in each team member. Rather than sticking to one style, a good leader changes tactics based on the situation and the people involved, managing not just tasks but also the feelings and dynamics of the team.

Learning never ends

Show more
avatar
Iskenski
• 4mos ago

The loop

“We’re a generation of men raised by women. I’m wondering if another woman is really the answer we need.” - Fight Club

"Мы из поколения мужчин, выращенных женщинами. Поможет ли другая женщина, в решении наших проблем?" - Бойцовский клуб

Show more

We don’t have to be smarter than the rest. We have to be more disciplined than the rest - Warren Buffett

Remember the formula:

Discipline = the value of the goal + the reward of the pursuit - the cost of the pursuit 

Show more

5 Reasons to Switch from Native to Flutter Development

cover img The beauty of the Flutter framework
Read the post

Setting up CRON Jobs on Linux Servers

If you're working on a Linux server and need to automate some tasks, cron jobs are your best friend. They are like little robots you can program to do stuff at specific times without you having to lift a finger. Today, let’s talk about how to set them up—it’s easier than you think!

First, you'll need to open up the crontab file where all the magic happens. Just type crontab -e in your terminal, and you'll be prompted to choose a text editor. If you're not into fancy stuff, just go with nano by typing 1 and hitting Enter.

Now, you’re in the editor. Here’s where you’ll write instructions for your little robots. Each instruction is written on a new line, and looks something like this:

0 4 * * * cd /path-to-your-project && php artisan some:command >> /dev/null 2>&1

Breaking it down:

  • 0 4 * * * is the schedule. It means “at 4:00 AM every day”. The first two numbers represent the minute and the hour, respectively, and the three asterisks mean “every day of the month, every month, every day of the week”.
  • cd /path-to-your-project && php artisan some:command is the task you want to run. In this case, it's a Laravel Artisan command.
  • >> /dev/null 2>&1 is a fancy way of saying “don’t send me emails about this task, and discard all output”.

Once you've written your instruction, save the file and exit the editor. Voila! You've just told your server to run a task every day at 4:00 AM. Now, this task will run on time, every time, rain or shine.

To check if your cron jobs are running smoothly, you can peek into the syslog with a simple command: grep CRON /var/log/syslog. This will show you a history of all cron jobs that have run.

And that’s it! Setting up cron jobs is a straightforward way to automate tasks on your server. Whether you're clearing out old data or running daily reports, cron has got you covered. Happy automating!

Show more