The process described below attempts to optimize reading quality books and enjoying the reading experience. As such, it promotes book exploration (discovery of new books) and reading books which have a high rating according to your own taste. Books which receive lower ratings (compared to other books) are moved down the reading priority list and will not be read until books that have higher priority (i.e., rating) either are finished reading or their rating decreases such that other books are now high priority.
- Pick highly read books (use a site like goodreads to identify those books).
- When reading a book, record the page you start and stop reading on, the time you start and stop reading and emit a rating for what you've read.
- You can decide to optimize whether you want to optimize per page rating or per duration rating, that is, get the most value per page or by time spent reading.
- Add new books to your reading list regularly. Those books are considered as having the highest priority and are then added to the prioritized list of books according to its rating.
- When not reading a new book, read the books in order of priority and by interest at the time of reading.
- From time to time you may look at your list of prioritized books and decide whether the books with the lowest priority should ever be finished. In some cases it is reasonable to decide that certain books will never be read completely.
- As an alternative approach, one can use multi-armed bandits algorithms to decide which book to read next. Given that we can convert multi-armed bandits problem into the problem of selecting which book to read next given a sequence of readings and associated rating ("rewards"), the various algorithms (such as Epsilon-greedy or UCB1) will provide us with the next book we should read.
- Interestingly enough, an algorithm like UCB1 will promote reading books we've never read first over reading books we've already started reading.
- Read partially any book for which you haven't given any rating
- Rate what you have read on a 1 to 5 scale, 1 being very bad and 5 being very good (see book rating)
- Compute the weighted rating of the book (the sum of rating times # of page associated to the reading divided by the total # of pages read so far for the book)
- Sort books by weighted rating (descending), then average estimated amount of time left to complete (ascending)
- If you have books that you haven't read yet, go back to the first step. If not, then pick the book at the top of the list computed in the previous step, then continue from step 2
- It's better to read a good book than to finish a bad book
Adding a class alias at boot time in Laravel
History / Edit / PDF / EPUB / BIB / 2 min read (~281 words)I make extensive use of Laravel Debugbar to track performance of parts of my application. I sprinkle calls to Debugbar::startMeasure
and Debugbar::stopMeasure
to track the duration of certain segments of my code. However, when this code goes into production, this dependency isn't present. This cause the code to break since it cannot find Debugbar
anymore.
To solve this issue, I thought I would create a dummy Debugbar
class and have it added as an alias, so that any code depending on Debugbar
would still work, but end up as a "no operation". I found the article Dynamic class aliases in package which introduced the necessary piece of information to accomplish this.
<?php
use Illuminate\Foundation\AliasLoader;
use My\SuperPackage\FooBar;
class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
public function register()
{
$this->app->booting(function() {
$loader = AliasLoader::getInstance();
$loader->alias('FooBar', FooBar::class);
});
}
}
In my desired use case, I simply implemented the following changes:
In app/Providers/DebugbarServiceProvider.php
(a new file)
<?php
namespace App\Providers;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Support\ServiceProvider;
class DebugbarServiceProvider extends ServiceProvider
{
public function register()
{
if (!class_exists('Debugbar')) {
$loader = AliasLoader::getInstance();
$loader->alias('Debugbar', NullDebugbar::class);
}
}
}
class NullDebugbar
{
public static function __callStatic(string $name, array $arguments)
{
// Do nothing
}
}
In app/config/app.php
// under the 'providers' key, add
'providers' => [
[...]
// This will take care of loading the service provider defined above
App\Providers\DebugbarServiceProvider::class,
],
With those two changes, it is now possible to make use of Debugbar
in most places and have it work even without the Laravel Debugbar dependency installed.
- Want to read but
- Too long -> Transfer to pocket
- Want to watch but
- Too long -> Add to a youtube watchlist (which I'll never watch)
- I need them open to quickly enter data
- I want to watch them again and again
- Download with youtube-dl and watch using VLC
- Would maybe read one day, but definitely not now (very low priority)
- Transfer to pocket
- If a tab is scanned more than 5/10 times, it goes into the backlog bin
Principle: a fundamental truth or proposition that serves as the foundation for a system of belief or behavior or for a chain of reasoning.
- Effectiveness over efficiency.
- Avoid spending your time on negative thoughts.
- Do not spend too much time thinking about hypothetical situations.
- Always improve.
- Always adapt.
- Surround yourself with positive people.
- Do not engage in fruitless debates or one-sided confrontations.
- Accept that nothing is perfect.
- Know what you want and don't want.
- Do not delay difficult decisions indefinitely.
- Learn new things everyday.
- Work on fewer things to get them to completion.
- Spend no time complaining.
- Spend time working on interesting things.
- Have people depend on you less and less.
- Work on things that matter.
- Avoid repeating yourself constantly.
- Continuously optimize.
- Have a structured process for everything you do that is written down and updated as it changes.
- Always remain positive.
- Put your time where you get rewarded for the effort.
- Minimize your regret.
- Invert, always invert.
- Spend less time trying to be brilliant and more time trying to avoid obvious stupidity.
- https://fs.blog/2013/10/inversion/
- Always write down why.
- Priority, priority, priority.
- Focus on input, not output.
- Copy, transform, combine.
- Use analogies when reasoning about complex ideas.
- Sometimes equivalents make it easier to reason about a problem when translated into a different domain.
- Prefer action over a perfect decision.
- Always plan, even if you don't end up using the plan.
- Never discourage anyone who continually makes progress no matter how slow.
- Stop starting, start finishing.
- Plan with the most realistic scenario in mind.
- Plan by preventing the worst scenarios from happening.
- Spend your time with happiness generators, stay away from happiness drainers.
- Always limit how much time you spend dwelling on problems and mistakes.
The onboarding process described here is specific to a software engineer joining a tech company. While some/most of the items may still apply to any job where you mainly work from a computer, the assumption will be that you develop software as an individual contributor.
- Setup laptop
- Access to slack
- Access to zoom
- Setup calendar reminders
- Initial meeting with buddy
- Access to git central repository
- Installation of development tools/languages
- Request software licenses
- Access to CI/CD
- Find where task management is done
- Find the documentation to build projects
- Connect 1 on 1 with each member of the team
- Meet with manager 1 on 1
- Define a 30-60-90 days plan with manager
- Verify access to various systems (SSO, code repository, insurance company, payroll company, etc.)
- End of week meeting with buddy
- Setup and run the one step build process
- Determine how are features/tasks prioritized, who prioritizes features/tasks
- Review the team documentation
- Review team practices/processes documentation (code style, code review, standups, planning, retrospective, demos)
- Review common vocabulary, terminology, glossary documents
- First PR + code review
- Review the career ladder of the position
- Review user definition, use cases, requirements
- Read prior team meetings notes
- Identify how deployments are done
- Review the team roadmap
- Determine where I can have the biggest impact
- Determine a timeline where I'll have reached my 80/20 at the company
- Determine the maturity of existing projects
- Determine how fast can we iterate on certain aspects given the team/company composition
- Identify the core/principal/staff contributors and their contributions
- Review the architecture of the system
- Review the database architecture
- Learn about "how we got to this point"
- Determine whether the product is a monolith or micro-services
- Identify which (3rd party) tools are used by the team/company
- Determine the portfolio of STARS situations of the team/company
- Determine a rough estimate of the number of people in the different organizations
- Connect 1 on 1 with important collaborator in other teams
- End of first month meeting with buddy
- First month performance review with manager
- Informal 360-degree review with manager and peers on adaptation
- Month 1 job satisfaction review
- Team interaction diagram
- Month 2 job satisfaction review
- Month 3 job satisfaction review