Blog en turnkeylinux-blog Keeping track of time <p>For the last few years I&#39;ve been using a nifty little program called <a href="">gtimelog</a> to keep track of how much time I am actually working (and in a basic way on what), and how much time I am off work, whether it is for a meal, a personal phone call, random web surfing etc.</p> <p>One thing I have found is that random non-work distractions can really add up at the end of the day, and they sort of creep up at you: &quot;It&#39;s 4pm, wow, did I really only work 1.5 hours so far? I better stay off Wikipedia and Hacker News if I want to get anything done tonight!&quot;.</p> <p>I find keeping track of your time honestly makes it easier to sit down, resist distracting temptations (I.e., it&#39;s easier to see how much they really cost) and put in whatever minimum of hours you are committed to working.</p> <p>Monitoring goals is a bit like flossing. You feel guilty when you go to the dentist and he asks you if you&#39;ve been flossing. You say no. He says, don&#39;t worry, you only have to floss the teeth you intend to keep. Similarly, you only have to monitor goals you intend to reach.</p> <p>Monitoring how I use my time not only makes it easier for me to set and reach goals, it also makes it easier to feel good about a productive work session at the end of day, when I can see I have met my goal (or exceeded it).</p> <p>Of course, keeping track of time isn&#39;t enough. Working smart (I.e., leverage, efficiency) is just as important if not more important than working a lot. Ultimately, it&#39;s not how much you work, but how much you accomplish.</p> <p>But as a general rule of thumb I have found the following to be true:</p> <pre> productivity = quality of work * quantity of work </pre><img src="" height="1" width="1" alt=""/> productivity Sun, 04 Oct 2015 14:27:04 +0000 Liraz Siri 2703 at Getting into the zone - Crazy tips for maximum productivity <p>The zone is a mysterious place familiar to deep thinkers. It is a mode of consciousness in which you are almost superhumanly intelligent and productive. Hard problems are solved in the zone. Getting into the zone is not easy, but it pays off. The downside to the zone is that it raises your expectations from yourself and others so much you will never be satisfied by normal again. The upside is that you realize what you are truly capable of.</p> <p>In the zone, your mind is a blade, a ferocious form of violent, nearly malicious intelligence.</p> <p>Have you ever been in the zone? I think you'll like it there.</p> <div class="section" id="minimizing-distractions"> <h2>Minimizing distractions</h2> <p>Removing distractions is crucial. I get into the zone most often when when I'm left totally alone for a few days. Most of my breakthroughs happen in isolation.</p> <ol class="arabic simple"> <li>I gather up all the research I'm going to need in one online sitting. I'll need to have it all in one place for offline browsing.</li> <li>I disconnect the Internet in such a way that I'll have to spend energy to fix. If it's going to be a short session (e.g., a few hours) I'll disconnect and hide away a crucial component of my home network in a hard to reach place. Usually this is just the basement which is relatively easy to reach. The longer I need to be isolated the harder I am going to make it to undo my decision. Once or twice a year I bury stuff in the woods by my house. That's when I need to do some really serious thinking. Good times.</li> <li>I remove the battery from my phone and throw it on top of a closet I can't reach without a ladder.</li> <li>I just start working. No excuses, no more delays. Writing down a clear set of goals before I start.</li> </ol> </div> <div class="section" id="feel-the-shape-of-it-in-your-mind"> <h2>Feel the shape of it in your mind</h2> <p>Sometimes as I try to begin working, I get this blocking feeling that things are not clear to me. I need to think about it to get a shape of the thing.</p> <p>If during this difficult period, I'll lie down to &quot;think&quot; and usually fall asleep. I don't really buy into the theory that my mind is getting useful stuff done while I'm sleeping. More likely it's just an avoidance reaction.</p> <p>I've discovered that whenever I need to clear up my thoughts, I get my best deep thinking done walking around in repetitive, rhythmic patterns, a circle, back and forth, etc.</p> </div> <div class="section" id="breaks"> <h2>Breaks</h2> <ul> <li><p class="first">Try to log your breaks, and schedule when they end.</p> <blockquote> <p>&quot;12:30 going to eat something. Back by 1:05&quot;</p> </blockquote> </li> <li><p class="first">For energy: you eat small meals when you're hungry. Don't wait to eat until your very hungry. You'll get tired after a large meal. After a meal, bring a bottle of something sweet to your workspace. That way you can keep your sugar levels up, which is important for being able to concentrate.</p> </li> <li><p class="first">I take a watch with me, and keep time tabs so I don't turn a 30 minute break into a 90 minute break.</p> </li> </ul> </div> <div class="section" id="in-the-zone"> <h2>In the zone...</h2> <p>Once I get into the flow of work, I mentally <em>lock</em> on to my goals and the rest of the world goes away. When I finally get into the zone it feels like I'm 5x more productive than usual. In one long sitting I can get as much work done as a week of unfocused effort. Some problems cannot be solved out of the zone.</p> </div> <div class="section" id="a-word-on-avoidance-psychology"> <h2>A word on avoidance psychology</h2> <p>Some of these techniques sounds silly, by it works extremely well for me, and if you try it, it might just work as well for you. The problem with getting started on something difficult is your mind often plays tricks on you - avoidance psychology and all that. From what I've read this happens because of subconscious internal conflicts which you may only be dimly aware of, or not at all.</p> <p>For example, maybe you're subconsciously afraid of failure, or worse yet, afraid of success...</p> <p>By consciously isolating yourself from distractions, you don't let your subconscious trick you into not getting any real work done.</p> </div><img src="" height="1" width="1" alt=""/> productivity Sun, 04 Oct 2015 14:27:04 +0000 Liraz Siri 2696 at Python's timeless principles of good software <pre class="literal-block"> $ python -c 'import this' The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! </pre><img src="" height="1" width="1" alt=""/> design development pythonic Sun, 04 Oct 2015 14:27:03 +0000 Liraz Siri 2704 at On motivation <p>Don't wish for the peak while you are still climbing the mountain.</p> <p>This is going to take as long as it's going to take to do it at a satisfactory level of quality.</p> <p>Mental shortcuts and trying to rush through the motions will significantly extend how long it takes to achieve this goal.</p> <p>You have to focus on the next step, and enjoy taking it.</p> <p>I suspect you are going to have miserable miserable time if you are praying for it to finally be over.</p><img src="" height="1" width="1" alt=""/> productivity reflections Sun, 04 Oct 2015 14:27:03 +0000 Liraz Siri 2706 at 13 simple writing tips <p>I love reading, I love books, and my friends say I have an overactive imagination. So it may not be terribly surprising that back in my teens one of my dreams was to one day become an author. A world famous author of course. Writing good old fashioned books. Which would be published with my name on them and which people would line up in book stores to buy. New books with that new book smell. I&#39;d sign them and impress the ladies with my wit and prose.</p> <p>But alas, one day I finally realized I enjoyed programming a lot more than I enjoyed writing. The Nobel prize for literature would have to wait until I got that programming bug out of my system.</p> <p>But I still write a lot. It&#39;s an important part of what I do. E-mails, documentation, blog posts, pseudo-philosophical musing on the meaning of life, etc.</p> <p>And occasionally, instead of thinking about what I want to write, I end up thinking about writing. And thinking about thinking about writing. Over the years this has led to various private insights on how to write better. I&#39;m not sure whether they&#39;re universal, but they work for me and they just might work for you too.</p> <div> <h2>Tips on writing technique</h2> <ol> <li> <p>First decide <em>what</em> you want to say, then <em>how</em> you want to say it.</p> <p>Your brain has bottlenecks, don&#39;t overload them or your mind will jam.</p> <p>The less you try to do in one step the better. This goes for writing as much as it goes for programming, or pretty much any other mental task.</p> <p>How do you put this into practice? My favorite way is brainstorming. Usually this is easier with paper and pen. You just jot down random related ideas in no particular order. If you run out of good ideas, I find sometimes walking rhythmically in circles or back and forth can help. Yeah that sounds weird but try it before you knock it. If you live someplace peaceful and quiet taking a long walk outside with your notebook can help.</p> </li> <li> <p>Order doesn&#39;t matter, it can always be changed.</p> </li> <li> <p>Write as many versions as you need to get it right: start writing, copy and paste a paragraph, modify, copy and paste again, until eventually you feel it says just what you want.</p> </li> </ol> </div> <div> <h2>Tips on attitude</h2> <ol> <li> <p>Starting is the hardest</p> </li> <li> <p>Expecting it to be easy: Writing is easy - &quot;you just stare at the monitor while waiting for blood to condense on your forehead&quot;</p> </li> <li> <p>Improving something is easier than making it perfect on the first try</p> </li> <li> <p>You can only do so many things at the same time - break big problems into little problems (otherwise you get stuck). Having trouble explaining too many ideas in one paragraph? Stop. Scale down what you are trying to accomplish. Use two paragraphs.</p> </li> <li> <p>Take one step at a time. Easy does it.</p> </li> <li> <p>Focus on the next step. Don&#39;t think about how much left you have to finish. That can be overwhelming.</p> </li> <li> <p>Relax self criticism and doubt</p> </li> <li> <p>Have confidence that the path will reveal itself when you get there.</p> </li> <li> <p>Enjoy the struggle.</p> </li> <li> <p>Don&#39;t think you can write? That&#39;s OK. Reality is not what is seems. Perception is not reality. The map is not the road. There is no spoon.</p> <p>In other words, it&#39;s ok if you think you can&#39;t write well, because you don&#39;t really know crap. You just think you do, and you&#39;re probably wrong. If you doubt your doubt and try really hard, over and over, you just might surprise yourself. Just do it.</p> </li> </ol> <p>&nbsp;</p> </div><img src="" height="1" width="1" alt=""/> tips writing Sun, 04 Oct 2015 14:27:02 +0000 Liraz Siri 2705 at CDPATH <p>I used bash for a decade or so before I discovered this little highly useful gem a few years back. Nowadays I can&#39;t remember what I used to do without it.</p> <p>From the bash manual page:</p> <pre> CDPATH The search path for the cd command. This is a colon-separated list of directories in which the shell looks for destination directories specified by the cd command. A sample value is &quot;.:~:/usr&quot;. </pre> <p>I&#39;ve added the following to my .bashrc:</p> <pre> CDPATH=.:/turnkey:/turnkey/projects:/turnkey/appliances</pre> <p>Now this works:</p> <pre> cd tklbam # takes me to /turnkey/projects/tklbam cd core # takes me to /turnkey/appliances/core cd notes # takes me to /turnkey/notes </pre> <p>For best results, turn on bash auto completion:</p> <pre> apt-get install bash-completion </pre><img src="" height="1" width="1" alt=""/> tips Sun, 04 Oct 2015 14:27:01 +0000 Liraz Siri 2708 at Bug hunting with the scientific method <p>I've never come across a problem I couldn't solve using the following technique / problem solving methodology, and I've come across some tough ones.</p> <p><a class="reference external" href=""></a></p> <p>As much as I might like to, I can't take credit for developing this stuff myself, as it is basically the same pattern that drives all modern science and engineering. I figured if it works for finding out the mathematical laws of the universe, developing nuclear weaponry and space flight, I could probably put it to work to solve my rather humble set of problems as well. It hasn't failed me yet.</p> <p>I use the scientific method to test my assumptions, when coming across unexpected behaviors, gotchas, bugs, or when I simply don't understand what is going on in a general sense.</p> <p>In a nutshell, I try to figure out how to break down what is happening into smaller pieces, preferably reducing the complexity of the test case and isolating the behavior I do not understand to the simplest case possible in which it is still exhibited.</p> <p>Then after I have reduced the monster into a more manageable-sized demon, I attack it with experimentation.</p> <p>I ask myself: what are my best guesses for what is causing this undesirable behavior? I form reasonable hypotheses. Then I plan for doing a range of experiments that will either validate or invalidate my hypothesis.</p> <p>The experiments are preferably as simple as possible while still shedding light on the problem, but no simpler.</p><img src="" height="1" width="1" alt=""/> debug development Sun, 04 Oct 2015 14:27:01 +0000 Liraz Siri 2707 at Just say no to multi-tasking: reflections on productivity <blockquote> <p>Tafasta merubhe, lo tafasta.<br /> תפסת מרובה לא תפסת</p> <p>- Ancient Hebrew proverb from the Talmud (Translation: Try to catch too much, catch nothing.)</p> </blockquote> <p>I had an unsatisfying couple of days that got me thinking what I was doing wrong.</p> <p>In retrospect, I realized I was jumping all over the place, trying to keep too many balls in the air. I was investigating the rsync algorithm, while trying to fix a TurnKey build problem, while researching distributed filesystems, etc.</p> <p>This is problematic for two main reasons:</p> <ol> <li>All that context switching is terribly inefficient. Truth be told I wasn&#39;t really focused on any of the things I was doing. Also, jumping from one task to another meant it was easy to lose my sense of purpose and direction. It&#39;s very stimulating on one hand, but with so many things in your mind, nothing really settles down and solidifies. It&#39;s harder to reflect on each task. Everything is tangled up into incomplete fragments.</li> <li>It&#39;s unsatisfying: even if I could maintain my efficiency, and do all the tasks in parallel, I would get all of my satisfaction rewards together at the end. I think this is one of the reasons that iterative programming is so effective - it keeps morale high by constantly rewarding the programmer with small, yet satisfying accomplishments. Going cold turkey and holding up for a big satisfying accomplishment at the end just isn&#39;t as psychologically engaging, especially if you are the kind of person that registers satisfaction briefly and then looks for the next challenge to attack.</li> </ol> <p>So here are my post-reflections resolutions:</p> <ol> <li> <p>Try to stay focused on one thing at a time</p> </li> <li> <p>Iterate toward big goals, by setting a series of small but meaningful sub-goals/milestones.</p> </li> <li> <p>Monitor the goals you want to keep (e.g., keep monitoring distractions and time spent)</p> </li> <li> <p>Work smart, work hard, and have fun!</p> </li> <li> <p>Attitude matters. You should approach work not as:</p> <ul> <li>a burden on your shoulders</li> <li>something to get over with</li> <li>a test of eliteness/personal self-worth</li> <li>an opportunity to fail</li> </ul> <p>But rather as a fun engaging playground of new things to explore and opportunities to play around and experiment (not make mistakes) in an open tolerant atmosphere.</p> </li> </ol><img src="" height="1" width="1" alt=""/> productivity reflections Sun, 04 Oct 2015 14:27:00 +0000 Liraz Siri 2710 at Trouble writing? You probably aren't scaffolding enough <p>Having trouble writing? It may be just that you are having trouble doing two things at the same time:</p> <ol class="arabic simple"> <li>decide what the prose should say (substance)</li> <li>write the prose (form)</li> </ol> <p>They are intimately interconnected. If you don't REALLY know what you want to say, you are going to have a hell of a time saying it. And then instead of actually writing sentences, you play with grammer and use alot of syntatic sugar until your sentence seems to have filled a respectable space (form over substance) and you can move on to the next one.</p> <p>The result? Low quality &quot;filler&quot; writing with a low signal to noise ratio.</p> <p>If you try and do the form and substance steps together, it is likely your struggle with form will reduce the quality of your thinking on the substance.</p> <p>Before you start writing prose you need to set clear your goals. You will never reach a destination if you don't know what direction to go in.</p> <div class="section" id="the-scaffolding-process"> <h2>The scaffolding process</h2> <ol class="arabic simple"> <li>brainstorm</li> <li>turn the brainstorm into form-free points structure</li> <li>play with the structure of the points</li> <li>decide what order you'll describe them</li> <li>background: get into your reader's head. Decide what background, context, stage you need to describe so the reader understands your points.</li> </ol> </div> <div class="section" id="writing-prose"> <h2>Writing prose</h2> <p>You try and write a sentence. You write a fragment. Then you're stuck figuring out how it should end. Your so focused on figuring out how to continue the fragment that you don't see the big picture. Should I have started with this fragment in the first place?</p> <p>Here's a technique that works better:</p> <ul> <li><p class="first">Don't write a fragment and try to end it.</p> </li> <li><p class="first">Write lots of fragments, that start from different places. Different perspectives. Different relations.</p> </li> <li><p class="first">The fragments don't have to connect to each other. (at first)</p> </li> <li><p class="first">You want to say 3 things. Instead of starting with one and trying to tack the two, write fragments for all 3.</p> </li> <li><p class="first">Copy fragments and then try to change them, instead of changing an original you feel has value. This way you aren't afraid of making the fragment worse, and loosing the value.</p> </li> <li><p class="first">It's much easier to string together a good sentence from all of these fragments then to come up with a good sentence from the first go.</p> </li> <li><p class="first">Write tree sentences from variations of sentence components you describe. It's like brainstorming and writing combined:</p> <pre class="literal-block"> Instead of starting out beginning trying to write with the the perfect sentence one precise version of the description that you are trying attempting to write down illustrate with words you can use break a sentence into multiple fragments a tree of possibilities. </pre> </li> </ul> </div><img src="" height="1" width="1" alt=""/> tips writing Sun, 04 Oct 2015 14:27:00 +0000 Liraz Siri 2711 at He never grew up, but he never stopped growing <blockquote> <p>He never grew up, but he never stopped growing.</p> <p>- Arthur C. Clarke (when asked what he wanted written on his tombstone)</p> </blockquote> <p>In retrospect, I tend to underestimate a lot of things. I underestimate challenges. I underestimate my own limits. I underestimate authority. I routinely underestimate how difficult something is going to be to accomplish.</p> <p>More often than not, I&#39;ve found this useful, as a person can grow and learn from the circumstances he throws himself into. If I knew in advance truly how difficult it would be to accomplish something, I could honestly estimate that it was beyond the capabilities I started out with. I wouldn&#39;t even try. However, I have found that if you try hard enough, you can usually learn to do things you could have fairly been judged previously to be incapable of. So you see, a kind of simpleminded optimistic overconfidence can actually be an asset, if you are stubborn enough to follow through.</p> <p>When you&#39;re starting out on an new challenge in life, you shouldn&#39;t give too much weight to your current skillset. Your current skillset is useful, but it is most likely significantly inadequate for the challenges ahead. No, what matters is not what you are, but what you can <em>become</em>, so long as you have sufficient motivation and the passion to overcome challenges, you can grow into the kind of person you need to be a few years down the road.</p> <p>Shooting for the moon does come with a few gotchas however. One common pitfall it that you tend to become very sensitive to what other people think of you. Watch out for that. Before you get defensive (or aggressive) consider whether you aren&#39;t really projecting on to others your own subconscious fears regarding inadequacy. A mild inferiority complex.</p> <p>Yes, you are inadequate, get over it. You are going to experience a continual state of inadequacy for the next few years, maybe more if you&#39;re lucky (that means you&#39;re still pushing the envelope!). This will require some compromise with your ego, which is always trying to pull you back into the comfort zone. You shouldn&#39;t allow your ego to shield you from criticism. You&#39;re smarter than that.</p> <p>Instead, you should gladly embrace this experience as an opportunity to grow. Remember though, that you don&#39;t get to grow for free. Growing is painful. What you need to do is somehow cross your wires so you become addicted to that sweet growing pain. No pain, no gain.</p><img src="" height="1" width="1" alt=""/> reflections Sun, 04 Oct 2015 14:26:59 +0000 Liraz Siri 2712 at