Category Archives: Chatter
Boolean functions
Today I realised that ‘and’ == ‘minimum’ and ‘or’ == ‘maximum’. Mind blown! :)
And here is some PHP code to go with my new found knowledge:
test( 0, 0 );
test( 0, 1 );
test( 1, 0 );
test( 1, 1 );
function test( $x, $y ) {
if ( and_1( $x, $y ) !== and_2( $x, $y ) ) { echo "Error.\n"; }
if ( or_1( $x, $y ) !== or_2( $x, $y ) ) { echo "Error.\n"; }
}
function and_1( $x, $y ) {
return (bool)min( $x, $y );
}
function and_2( $x, $y ) {
return ! ( ! $x || ! $y );
}
function or_1( $x, $y ) {
return (bool)max( $x, $y );
}
function or_2( $x, $y ) {
return ! ( ! $x && ! $y );
}
Periodic table
Osamu Tezuka
Osamu Tezuka is the guy who made Astro Boy.
Today’s reading
I’m reading a bunch of things today. Among them: a dead tree version of The Unix Programming Environment; the wiki page for Seymour Cray; and Lex Fridman’s interview with Donald Knuth.
He Huang
I found this hilarious comedian: He Huang.
Economics, writing, and C programming
“The three things I would tell people to learn are economics, writing and C programming,” said the Stack Overflow (SO) co-founder and globally-recognised expert on software development.
7-step method to approach any new task
I’m reading Master Your Thinking: A Practical Guide to Align Yourself with Reality and Achieve Tangible Results in the Real World. Here are seven questions to ask before you begin a task:
- Is this task a priority, or could I do it later?
- If I could do only one thing today, which task would have the most impact?
- Is this task moving me closer to my main goal?
- Do I really need to do it right now, or can I do it later?
- Is this task valid, or can I forget about it?
- Do I really need to do this task?
- Is right now the best time? What would happen if I delay it for a week? A month? Forever?
- Do I need to do this task, or am I doing it because it makes me feel good? In short, am I working on this task to escape from what I really should be doing?
- What does done look like?
- What exactly do I need to do here?
- What am I trying to accomplish?
- What does the finished product look like?
- Am I the person to do this task, or can I delegate to someone else?
- Is this task really worthy of my time?
- Can someone else do it better than me? If so, can I ask for help?
- What would happen if I simply remove/postpone this task?
- Do I enjoy working on this task? Does it motivate me?
- What’s the best way to complete this task?
- What tool(s) can I use, people can I ask, or method can I rely on to complete this task as efficiently and effectively as possible?
- What skill(s) could I learn or improve to help me complete this task faster in the future?
- Can I batch this task with other tasks I need to do?
- Can I batch this task with other similar tasks to boost my productivity?
- Can I automate this task, or create a checklist or template?
- Can I create templates to reuse every time I work on this or on similar tasks? For instance, you could design templates for the specific emails, presentations or documents you need to create over and over.
- Can I create a checklist? Checklists provide you with specific steps to follow, making it less likely you will become distracted or confused.
Core Knowledge Sequence
I found this, it’s really interesting: Core Knowledge Sequence. Pedagogy is such a fascinating topic.
Writing a book: is it worth it?
Today I read Writing a book: is it worth it? Short answer: probably. I’m in the process of writing a book about database design, and it has slowly dawned on me what a huge undertaking it is actually going to be.
p.s. I found the above article after having stumbled my way through here. There’s some interesting stuff there.