Showing posts with label productivity. Show all posts
Showing posts with label productivity. Show all posts

This Week I Learned - 2017 Week 26

Last week post or browse the archive of mindless ramblings.

Week 26 of 2017. We've finally reaching the half part of the year. So many things to do, so little time available.

"Eat food, not too much, mostly plants.". Avoid white processed food or any kind of fast food. Sounds simple right? Hard for us to follow. With a tendency of bridge, especially during dinner and sedentary life style, I doubt anyone have the time to eat a proper good healthy meal. What can we do then? Read discussion on forum and read scientific papers, and develop your own methodology. Good example of such research. However, some studies were paid studies to fit certain agendas, checking for a reputable sources is quite difficult due to signal to noise problem. Furthermore, most discussions are just personal anecdotal, which you know, is just a sample size 1 observation or N = 1 situation. To reduce all these noises and personal anecdotal, do your own research and refer to few reputable sites like NHS Choice and Harvard Health Online (paid subscription). Everyone mileage may varies, as we tends to trust our body and conduct N = 1 experiments on ourself.

Be careful when going to any chiropractors, don't let anyone have a quick jerk of your head. Better still, see an orthopedist with chiropractic knowledge.

MySQL, seriously, what an effed up database system. Conversion from one character set and collation to another was rather tricky. Resolving "ERROR 1071" was not as straightforward at it seems.

Interesting idea. Just focus on 3 things. 3 things per day, per week, per month, and per year. Experience have taught me figuring out which three things is the hardest part. We're constantly fighting over on the should and want.

This is what happened when an organizational system have been practiced rigorously. Way overboard for my taste. But different people have different working style and culture. While it's good to go for simplicity with an analogue approach, but managing index cards the manually way is just way too cumbersome. Pen and paper is good when you don't need to archive the information and can simply throw it away.

Meanwhile, the post on electric typewriter and reading environment gave me an idea on converting my Raspberry Pi into one digital typewriter. I just need to setup my writing environment with a monitor, mechanical keyboard, a mouse, and a good reading lamp. Just fire up the tiny box and start writing. Jot down what ever come to you without any prejudices and judgement. And eff grammar.

Why process is important? Cognitive errors more likely to happen than procedure errors. Stick to the process.

Fanny pack and Underbone (kapchai). These are like almost like everyday carry (EDC) and yet I don't even know the actual names.

Seeking job fulfillment? Depends on what you want or to sugar coat it, whether its align with you moral and ideological compass. Some don't dream big and content with their role, even through with minor contributions. Some based on ideology. If you want better pay, you will likely to end up with job you don't like, just like 98% people out there. Or maybe you should take a different view, the job itself is just your bread and butter, use the money to do something you find more fulfilling. Provided that you save your income aggressively like 25 times annual expenses.

Something of similar nature, how not to bring emotion from work back to home or how do you decompress after work?

Another day, another weird validation rule when using Vim and LaTeX.

GNU GPLv3 turns 10. What a long way to go since the first decade. Like it or hate it, this license have significantly changed the whole computing industry, especially free and open source software development. Without it, we are still at the mercy of proprietary licenses in all our computing devices. If you ever use any free and open source software and benefits from it, it's time for you to help out, sign up and be a member!

"TDD failed for economic reasons, not engineering ones." This is so true for legacy system when you want to add new feature but don't want to break existing stuff.

This Week I Learned - 2017 Week 25

Last week post or you can explore the archive.

Writing and nothing but writing. Imagine starting from 8 in the morning until 12 in the night, minus the eating time and occasionally short breaks, you have to write up something to fill the remaining 12 pages. Staring at the monitor for 16 hours non-stop will definitely depleted you and causing much stress, especially to your eyes. The sudden and urgent feedback caught me by surprise. Totally messed up my daily routines. The aftermath of this last minute changes is you have become wordy, like one of those week I've experienced before. Therefore, this week blog post will be a bit wordy than usual.

One hard lesson I've learned during this writing period, reading and lots of reading is essential for writing. There is no way for you to churn out anything fast, if you don't even have a clue on what you're going to say. Want to be a better writer? Be a better reader. Reading a technical paper and a fiction requires different strategy. The former needs a systematic and structural way of extracting information. The later, you just need to use your imagination and indulge with it.

Another one. Statistics is very important, far more practical and relevant than other branches of mathematics. You never know when you going to need it, but when you do, you really do! Time for relearn and pick up some statistics.

The next lesson? I think I finally and partially understand what the heck is methodology, which in short, a set of practices or procedures. To explain in another way, a step-by-step procedure on how you going to tackle a particular problem. Particularly, you have to explain when, where, and how you're going to carry the procedures. It changed how I read, understanding, and absorb information. In the end, all the details, some ways or another, are transformed into a flow chart.

Back to the regular weekly ramblings.

Via Reddit. World oldest gymnast, Johanna Quaas, 91 years old to be exact. Nothing but good genetics, healthy and active lifestyle, be independent, and how to age gracefully. There are so many ways your body will let you down and kill you when you age. Genetics aside, which is out of our control, this is definitely doable, you just need to have the persistent and patience to do it. Seems that cycling is preferable than running, if you don't want to damage your knees due to running.

Do you plan your next day ahead? I've been facing the same problem in organizing my life. It's a long tedious process of trying different organizational systems (Four Quadrants / Eisenhower BoxGTD, Bullet Journal, and Pomodoro) to see which one sticks. Typically, nothing stick for a long time, after a while, you will drifted away and back to your old self. The main issue procrastination. You're aware of the priority, but don't feels like doing it. Then it dawned to me that time management is actually mood or mind management. If you need to to something important, schedule it at the time where mentally you're most alert and aware. For example, early in the morning when you first woke up is probably the golden hour of productivity.

Maybe the mentioned systems are way complicated as it can lead us to overly micro planning. Remember, there is no one true system, it's a mixed of everything with some adaptation. Why not going analogue and low tech with a simple pen and paper. Jot down your to-do list, prioritize, try to get things done within that day will work. Not every day is a perfect day. Accept it. Not everything will be completed within that day. Reschedule the unfinished tasks to the next day. For more refinement, break the day into four sessions of morning, afternoon, evening, and night.

Regardless how you optimize your day, the first thing is to plan ahead, way ahead like life goals from 6 months to 30 years. The longer the planning, the more you will aware that most things don't matter that much in life eventually. I agreed with the poster's four assumptions, especially that "productivity is getting the most important things done" and "most people don't have that many things they truly want to accomplish.".

Classic Papers: Articles That Have Stood The Test of Time. Collection of ten most cited papers from different area of research. Unfortunately, only from 2006. It would be nice the paper can be extended from far longer before 2006, say from 1900. Interesting found was this paper, Who should fix this bug? where the author was using machine learning to semi-auto assign a reported bug ticket to the a developer.

LaTeX, where what is hard is easy, and what is easy is hard. Editing LaTeX file with Vim? Plenty of errors that you probably needs to amend to make it go away. Generating PDF file and the page dimensions seems off? Readjust the page margin dynamically. Sigh. No matter how much I love typesetting, the hassle and effort of tweaking the layout is not worth the time.

When using Git, branching is easy and cheap. Two things that I need to use quite often when merging changes from different branches. First is create more throwaway branches and squash merge using the `--squash` parameter. Second is cherry picking using the -n parameter. Both ways do merge but not commit the changes.

This Week I Learned - 2017 Week 23

Last week post or the stuff from the archive.

Busiest week ever. Spent lots of time tidy up all the loose end. Non-stop churning out words after words for the past few days depleted me both mentally and physically. Having to write the same thing again and again but in different ways exhausted me further. Nevertheless, it was an "interesting" experience. Cognitively it was challenging but your learn a lot at the same time. However, if the knowledge gained will be forgotten later, then why we need to pick up it in the first place?

#1 On work ethic. Emphasis added.
Work ethic is about showing up, being on time, being reliable, doing what you say you’re going to do, being trustworthy, putting in a fair day’s work, respecting the work, respecting the customer, respecting the organization, respecting co-workers, not wasting time, not making work hard for other people, not creating unnecessary work for other people, not being a bottleneck, not faking work. Work ethic is about being a fundamentally good person that others can count on and enjoy working with.
#2 Iomega's Zip drive. We used to own one and have a few disks lying around. Not sure what happened to it. But one thing for sure, recordable CD, which was superseded by DVD, and USB thumb drive really killed the product. I still can't remember what we used it for, maybe just to backup all our downloaded files?

#3 Best possible reason on why Intel is not putting any significant efforts or buying more times on tackling AMD's Ryzen Threadripper. Intel and Microsoft have completely missed or failed the mobile market. If Intel cannot produce anything that match up ARM's mobile market dominance, we will see a significant shift of Microsft from x86 platform to ARM. 

#4 Writing journal is the art of talking to yourself silently. However, the correct approach to journaling is to focus on both cognitions and emotions will have the best benefits. I was contemplating of getting an actual typewriter to switch to more manual way of writing but the cost of the typewriter is surprising expensive, roughly more than MYR500. You probably can buy a very decent second hand computer with that pricing. There exists also Freewrite, a digital version of distraction free typewriter, sort of. Or the predecessor, the Alphasmart Neo or the retro looking Cambridge Z88. However, the pricing is just ridiculous! Why not spend the money on getting a second hand laptop like a used ThinkPad instead? Heck, might as well just switch to pen and paper instead.

#5 Productivity is less about time management than it is about mind management.. Profound insight. Basically is all about "hacking" your brain and getting it to a desired state.

This Week I Learned - 2017 Week 12

Last week post or you can read the whole series.

9 hours of writing and only 3 pages done.

#1 The important of morning rituals in developing a system (install a habit) to achieve your life goals. Is good to be morning person as you can achieve quite a lot when your mind is fresh. There are these 7 morning rituals which I will slowly introduce to my daily life. These are:
  1. Plan a day before. I've been slowly adopting this habit by going through the list of items in my bag and write down what I need to do tomorrow. Not consistent though as for some day I failed to plan for anything.
  2. Wake up early. Either from 4:30 AM till 6:30 AM. This is doable provided that you sleep quite early on the previous day. According to this sleep calculator, these are the corresponding time you should sleep if you want to wake up at a particular hours.
    1. 04:30 AM - 7:30 PM or 9:00 PM or 10:30 PM or 12:00 AM
    2. 05:30 AM - 8:30 PM or 10:00 PM or 11:30 PM or 1:00 AM
    3. 06:30 AM - 9:30 PM or 11:00 PM or 12:30 AM or 2:00 AM
  3. Start the day with exercise.
  4. Do your highest priority projects. Study in the morning and reviewing again in the evening before bedtime. This is good for learning as you can recall and rethink what you've learned in the morning. Also? Before even you start your journey to work, you've already accomplished so much for the day.
  5. Work on your side projects. Definitely need to try this. Do not work on your side projects late at night. Do it in the morning.
  6. Have a uninterrupted conversation with your partner. Do we actually having any serious and uninterrupted conversation with our partner, even for just two minutes? Doubt so.
  7. Meditate. I've been doing this since the moment I woke up in the morning. Although for just a mere 10 seconds, slowly but surely I can really concentrate on it.
#2 Beautiful SICP. There is another Python version as well. The discussion is always revolves whether it's good or not. I haven't yet finish the damn book since I bought it 20 years ago. Is this year the year for me to finish it? Doubt so. Even though I placed the book next to my work place and look at it on daily basis. Also, SICP is also the recommended book (debatable) on the subject on programming in Teach Yourself CS. (via HN) While we on that, someone should start another list on Teach Yourself SE. My personal experiences is that Software Engineering knowledge far outweight the Computer Science knowledge.

Since we can all access good quality CS education through the Internet, does local CS degree still relevant today? Or does this means that universities or colleges have been rendered to just another platform for face-to-face socializing instead of gaining knowledge?

#3 Almost 15 years of Design by Contract. I can relate to the author experience and still is a firm believer of Design by Contract (DbC). Bertrand Meyer still have a huge influence on me. Like most things in life, moderation is the key. Use DbC only when necessary.

#4 Real-time LED strip visualization (see Gif animation below) using ESP8266 or Raspberry Pi. Not only the project was interesting, the detail documentation by the developer was impressive. Definitely one of the most solid Github project I've encountered.

#5 Alone in the Wilderness. (via Reddit) A documentary (search YouTube for the video) about Richard Proenneke, who upon his retirement at age of 51 years, build an ultimate man cave to live a life of solitude in Aslaka. Carpentry is such a underestimate skill a man could have.

#6 Interesting Git graph generated by Bit-Booster, the offline commit graph drawing tool from one of my personal Git repository. I'm not sure how to interpret the relationship of my commits, seems somehow broken?

This Week I Learned - 2017 Week 10

Last week post or just follow the whole series.

Got my result today. It seems I've officially "crossed" the borderlines stage. I'm still contemplating on the next step but drastic life style changes is inevitable (more in item #5). If left untreated, it can grow into bigger problems, not only for yourself, but for your loved one as well.

#1 You May Want to Marry My Husband (via HN). Beautifully written. We need to be constantly reminded of the fragility of life especially contemplating one's mortality. The lack of awareness will bite you and your loved ones somehow in the future. Over 30-something and still bogged down by random trivialities in life? Nothing but continual reflection on your life priorities (often misplaced) and gratefulness helps to make peace with current and past self. Regrets? Yeah, plenty. Who doesn't? But not to a point where you will lament later in life that you should, would, or could. Wish you've taken a different path? Nah. I'm good. Yes, there is still room for improvement. Looking forward to that.

Further reading. The 10 Best Modern Love Columns Ever.

#2 On Perl. Interesting thing learned. How do you clone a hash and at the same time, reassign new values to some of the existing keys? Simple and yet so effective. To explain this,  `%$foo` expands expands the hash into a key-value pair and the curly braces (anonymous hash constructor) will create a new hash reference. Output is from Devel::REPL module, the modern Perl interactive shell.
$ my $foo = {a => 1, b => 2, c => 3};
\ {
    a   1,
    b   2,
    c   3
$ my $bar = {%$foo, a => 4, b => 5}
\ {
    a   4,
    b   5,
    c   3

Instead of just doing this.
$ my $foo = {a => 1, b => 2, c => 3};
\ {
    a   1,
    b   2,
    c   3
$ my $bar = {%$foo};               
\ {
    a   1,
    b   2,
    c   3
$ $bar->{a} = 4;
$ $bar->{b} = 5;
$ $bar
\ {
    a   4,
    b   5,
    c   3

#3 Carton. Bundler for Perl. In other words, module dependency manager for Perl. Is Perl a lost cause that only a few diehard users still using and maintaining it? Seems likely to me.

#4 Ship daily. That probably the way to get your side project moving and don't feels like you're not completing anything. Can't do it? Maybe you're setting the bar too high and setting yourself up to failure. Of course, some are created to be thrown away. While I don't totally agree on the needs to to finish all your side projects, but when comes to actual paid work, we need rethink our role. Instead of a programmer, think yourself as a problem solver instead. A tiny shift of that mentality will get you closer to the deliverable.

#5 Getting older? Getting weaker? Maybe you should check your weight and measure your Body mass index (BMI)? If so, you should to readjust your diet. Stop eating like you're in college days. More (not just) portions of fruits and vegetables? Furthermore, be informed and mindful of what you put inside your body. Of course, exercise is needed as well. However, exercise alone does not lose weight. Joao Venture have experienced weight lost by reducing most of his sugar intake and maintaining 3 km daily walks per day. Using this calculator, 3 km is 3937 steps, rounded to 4000 steps. Those who works as software developer with sedentary life style, it's a struggle to reach 4000 on daily basis.

Looking through my steps count below, both my mean and median are roughly around 3000 to 4000 range. This fulfill at least one of the criteria. The next step is to adjust my diet by reducing my sugar intake. Interestingly, since the beginning of 2017, I only manage to hit 10000 steps only four times!

On a related note, sleep is also a crucial factor as well. What Kind of Sleeper Are You?

#6 The Unofficial MySQL 8.0 Optimizer Guide. The section on profiling is interesting and I really don't have time to go through each item on databases I'm working one. Definitely going to improve any legacy and messy databases.

#7 When comes to programming, some of us still missing the point that we're a problem solver first and a programmer second. Follow a process and the convention. Prioritize. Keep the solution simple (yes it maybe boring) and don't try to do things the fancy way unless really, really necessary.

This Week I Learned - 2017 Week 08

Last week post or the whole series.

Interesting week where your body is giving up on you. Not only adequate and timely sleep is important, it's also crucial for you to keep alert, especially when riding a bike.

#1 Git merge vs. rebase. While I'm almost doing it on daily basis, yet I can can learn a few tricks from time to time. First, is to rebase local commits before commit. One of the mistake I did with another teammate while working on a topic branch is that we `git pull` instead of `git pull --rebase` before committing to the topic branch. Alternatively, we can rebase from remote topic branch before committing. Second, is that I always rebase from `master` branch but always have to resolve a lot of merge conflicts. Instead of rebasing, maybe I should merge instead?
$ git checkout branchX
$ git merge master
$ git rebase -i @{u} # @{u} stands for upstream
$ git push origin branchX

#2 Laura Vanderkam on gaining control of your free time. The key to time management is to focus on the priority. If you don't have time for something, then something is not a priority. If someone willing to pay you 100k for that task, then you will find time to do that task! In short, lacking time is not the actual reason, but you just don't want to do it. You are procrastinating.

How to find those priority items? Start with the end in mind. List down 3 to 5 items. Imagine writing your own performance review for next year for either personal or professional. Foresee what great things you're expecting. Now you've a list of items, how do you manage it?

Friday afternoon (is a low opportunity cost, you don't have to give up a lot). Make three categories, career, relationship, and self. Put two or three items into the three categories and plan these items for the next week. Normally, things aren't always proceed with what we planned.

168 hours. This is equivalent to 24 hours times 7 days. Typical breakdown of the hours spent per week for me are:
  • Work plus travel : 10 hours / day, 50 hours / week
  • Sleep: 8 hours / day, 56 hours / week
  • Total hours left: 168 - 106 = 62 hours / week, 8.8 hours / day
62 hours?! What was I doing all these years?

Having awareness is a key step for moving forward. The question right now is what can you do with those 62 hours? Schedule your items according to these 62 hours. Develop a system accordingly. Easy right? No, we're not busy, Sometimes, we're just plain lazy.

#3 Browsing through MSP430 Q&A in StackExchange's Electronic Engineering forum. Some interesting selected questions.
#4 ARM Cortex-M4. Another interesting microcontrollers which support 32-bit processing capability and quite a few number of brands to choose from. TI MSP432 LaunchPad and STM32 F4 Discovery Kit caught my attention. I prefer the later due to the embedded 2.4" QVGA TFT LCD screen. Will proceed with this microcontrollers once I've done enough with my MSP430.

#5 Dual in-line package (DIP) is one of the packaging types of integrated circuit. When switching different processor from the microcontrollers board, you will need a DIP extraction tool, the professional one. Due to budget constraint, I bought the cheapest I can find, roughly around MYR7.

#6 Buying a TV? The Cnet TV buying guide is best I've read so far. I was surprised to learn some of my generalizations regarding TV were far off. In short, at least 40 inches LED LCD TV with local dimming, full-array LED backlights, and dumb TV. Unfortunately, the recommended brand, TCL is not available in MY. Something interesting and coincident. While going through my photos, I've noticed I've took the same TV model at the same day at two different years. Maybe it's a sign for me to get that TV instead?

This Week I Learned - 2017 Week 07

Last week post or the whole series.

When come to getting new stuff, I really should have a one-item policy. For example, if I'm going to get a new bag, either I sell off the existing bag or donate it out. Otherwise, no point having two bags where you only going to use one. Not only is wasteful, it's also a hassle to store it and clean it as well. Something for me ponder upon when I'm thinking of getting any new stuff.

#1 Six modern keys to wealth. HN user, monodeldiablo describes six possible ways for anyone to accumulate wealth. In essence, you should be competent (both book smart and street smart), persistent (perseverance), and extraordinary lucky (right place, right time, and right people).

Developers are generally book smart but always having difficulties to monetize their projects or technical ability (turn it into a business). The most recent example is JWE, the author and maintainer for GNU Octave is looking for job after 25 years of maintaining the software (I think he is doing a great job since he have been doing it for 25 years but having some financial difficulties these few years). I've made a small contribution to him and being a FSF associate member can help too (just make a note in your monthly contribution). Expect some blog posts on GNU Octave in coming future.

#2 Coroutines in Perl? Use Coro module. More on asynchronous programming in Perl in coming posts. Busy week and I can't seem to allocate any time to look into this. So many things to follow up and so little time.

#3 Prioritize! Prioritize! This reminds me of Stephen Covey's four quadrants approach (similar to The Eisenhower Method) of prioritizing to-do list and time management.

#4 theXeffect subreddit. Fundamental approach to build habits and prevent procrastination. Also known as the "Seinfeld Strategy". Following Bombjoke advice, the steps as follow.
  • Buy a pack of index card. Get the one from Daiso with 5mm grid.
  • Start with Boléro by Maurice Ravel as your background music.
  • Pick a daily habit you want to develop. May I recommend meditation?
  • Write the reasons on why you want to develop the habit on the back of the card.
  • Start now. Do the habit. Once done, mark a big 'X' on the box. If you fail, mark a big 'O'.
  • Continue for 66 days or 2 months. A habit is formed after that period.
The index card by hardcase00 shown below is a good example to illustrate the steps mentioned. Look closely at the card. In order to continue the streak, he have different minimum meditation time ranging from 5 seconds till 15 minutes. Set your goal so low and easy that you don't have any excuses of not doing it. Remember the main purpose is not to focus on how long you can meditate but to develop a habit of daily meditation.

#5 Software developers who started after 35. I have mixed feeling about this. Is good that anyone who are diligent enough can pick up software development skill but Peter Norvig's post on teaching yourself programming in ten years reminded me otherwise. Well, it depends on how you see software development itself. Is it a tool for your to achieve your goal? Or a skill you wish to gain and master? Different people have different motivations.

#6 Is PostgreSQL good enough? (via HN) By far, best written technical post I've read this year. Sad about the font size though. Seriously, who read at such small font size? I've seen quite a few systems which can benefit greatly if they switch to PostgreSQL instead of MySQL. MySQL, being popular and easy to learn doesn't means that it's suitable for all scenarios.There are other requirements where PostgreSQL fits, for example, PostGIS. For a comparison between two to programming languages, MySQL is like dynamic-typed programming language and PostgreSQL is like static-typed programming language. If I'm going to develop any intranet web application which involves critical financial information, my first choice is definitely PostgreSQL.

#7 Goals are for Losers. Passion is Overrated. Provocative opinion but make sense. You need to implement a system or habit to achieve what you want in life. Not passions or goals. Example from the slide is losing 10kg is a goal but eating the right way is a system. To increase the success of what you want in life, use a system approach to acquire more skills which can increase your odd. Summary of this approach. Item #4 is also another good example of systematic approach increasing the success rate of what you want to achieve in life.

This Week I Learned - 2017 Week 06

Last week post or the whole series.

Slow week. Just back from holiday and my aging brain is slowly picking up the pending tasks on hand. Not a productive week.

Changing my approach to handle to-do list when comes to own personal project. Have an idea or looking at a procastinated long list, just get something up. Don't care it's not working, even a simple "Hello World!" is good enough. Once it's up, you will have to tendency to do something about it later or in future. It's basically just moving an item from a to-do list to another form of to-do list. Nevertheless, something get started somehow. Best to keep the momentum going.

#1 MSP 430 Competitive Benchmarking (SLAA205C, PDF). Is an old (2009) benchmarking results comparing MSP430 (MSP430F5439) against several other microncontrollers. For more up-to-date results, see the report from EEMBC. CPU is not just the main factor, sometimes, power consumption is an important deciding criteria. Top 5 most efficient microcontrollers according to ULPBench.

#2 The answer is seven. When end result have higher social values over hardworks (you can trace it back to financial reason), do we still care crap about the effort? People always looking for shortcuts in life. Some would prefer to call this being smart and efficient where the goal is to spend minimum efforts to obtain maximum output. Have you encounter student who tried to contest the exam result when he put little efforts? There exists a group of people who are lazy and entitied. Well, laziness is virtue right?

#3 Reverse-Engineering work on the TL-WR703N 150M 802.11n Wi-Fi Router. Interesting works on TL-WR730N which was used as a cheapest embedded GNU/Linux platform (OpenWrt). However, it's quite hard to find this in MY anymore but there is another model which superseded it, TL-MR3020. Alternative choices includes GL-MT300N and Nexx WT3020. I was considering getting one but hold that thought because I'm not sure what to do with it. My Raspberry Pi and Beagleboard still collecting dust.

#4 Ceriatone. Surprising good (from the YouTube reviews) and "affordable" (compare to those established amp makers) guitar tube amp board kits from MY. See TubeDepotTV if you want to find out how to assembly your own guitar tube.

While we're on guitar. Thinking of getting a Squier? Watch Squier Roundup: A look at six Squier guitars from worst to first. Which Squier then? Anything over MYR1000 should be a good choice. To be more specific, skip all Affinity or Bullet series and those made in China.

#5 Box Breathing via HN. The steps is quite straight forward, inhale, stop, exhale, and stop. Just four steps with different duration for these four steps. There are several other breathing techniques as well like The Stimulating Breath4-7-8 Breath, and Breath Counting. I've tried different Android app, so far, Breathe (similar to the Box Breathing site) works for me.

This Week I Learned - 2017 Week 03

Last week post or the whole series.

#1 Having trouble finishing any personal side projects as a developer? Rethink the purpose on why you want to start a side projects? Don't be so hard on yourself, nobody is keeping scores and gives a crap. Do it because you want to learn, experiment, and have some fun along the way. However, keep the coding streak going. Don't overwhelmed yourself, it's not a full time job. Also, do not fall into the trap of researching more than doing ala analysis paralysis, a common behaviour when you're starting a new venture or hobbies and get overly excited.

#2 ShewhartJuran, and Deming. The giants of Total Quality Management (TQM) and theory. Humphrey applied these theories to software quality and thus, leads to the development of Software Engineering Institute (SEI), Capability Maturity Model (CMM), and Capability Maturity Model Integration (CMMI). Can quality theory used for manufacturing translates well to software development? Depends. Highly for embedded system development but doubt so for normal web development.

On a related note, can we apply these quality models and theories to our personal productivity and optimize our habits? If we consistently miss our commitments to our self, isn't that a symptoms of process failure? Hence, if we fix the process and thus fix our habits, can we increase the probability of the success of our commitments? Also can we apply CMMI's capability level to personal financial planning? That's food for thought. Again, this is a possible interesting idea, daily SCRUM family meeting. I've tried something similar with limited success. Feedback from SO is that it's too formal and too rigid.

#3 Keep up with fast changes of development field? Don't do front-end stuff. Don't follow the flash-in-the-pan (hot) technologies. Learn durable skills. Study and take online classes. Be a generalist? Don't think so. While we're still thinking on what hottest technologies or practices to use, ask yourself "when is practice X useful?" instead of "is practice X a good idea?" Good example is the numerous Agile practices, there are so many and not every one is applicable for your organization. One little gem I learned, Agile is used primary to solve communication or requirements issues. And also, another example of those practices is the use of monorepo, even through you're using a distributed version control system.

#4 T(Type) Driven Design over T(Test) Driven Design. Interesting indeed. Instead of embracing T(Test)DD, the problem can be partially solved by switching to a statically type programming languages. For example, switching from Python/Perl/PHP to Golang?

#5 While watching the short documentary series Mind Field on the subject on isolation, little I realized that boredom is the result of your brain lacking stimulation and worse, and epidemic psychological behaviour will little scientific studies.  Moreover, researches have identified that there are different types of boredom. Interestingly, Plutchik's wheel of emotions grouped the emotion of boredom with disgust and loathing. No wonder philosopher, Søren Kierkegaard said "boredom is the root of all evil" (or is it creativity?). How to prevent our self from succumb to boredom? Thinking about boredom itself, why something bores you. Or because we've become habituated? Maybe practice gratitude is an alternative way to resolve that?

#6 The Old School Object Oriented Perl (OSOOP). Yes, the bless-way. As I mentioned many times, specifically, Perl is a text processing programming language with multiple ways of doing things. Hence, OO supports is to the bare essentials, there is not syntactic sugar what so ever. If you're creating a CPAN module, best to use lightweight Moo package, which was designed for that purpose.

This Week I Learned - 2017 Week 02

Last week post or the whole series.

#1 Continue with CMake again. Not sure why, I'm having lots of fun picking up C++ and enjoying the learning process, although it's quite frustrating when you're stuck with a problem. The weird thing is, is totally different experience with doing web development compare to system programming. Nevertheless, some knowledge gained from using CMake.

As I mentioned before, if you're picking up C++, start with Modern C++, or at least C11 standard. To enable this explicitly in CMake, put this line in your CMakeLists.txt file.

To verify that the setting have been set to compiler.
$ make VERBOSE=1 | grep std
/usr/bin/c++     -std=gnu++11 -o CMakeFiles/stree.dir/ -c /home/ang/src/stree/

If you move all your source files into a `src` folder, how do you configure CMake to include these files during compilation? Using GLOB directive.
file(GLOB SOURCES src/*.cpp)
add_executable(progname ${SOURCES})

#2 The C++ 'const' Declaration: Why & How. Definitely a good guide and explanation on understanding and using `const` keyword in C++. The gist of it is `const` prevents alternation but it sometimes caused confusion depends on the context of usages in variables, methods, return values, or function arguments.

#3 It just dawned on me that the sole reason Design Patterns (the book) was written is to collect all the workarounds to the limitation of C++ language itself. For example C++ does not support introspection or dynamic instantiation, hence, a list of creation patterns exists to handle the object creation. What this means is that C++ can't create objects during run-time (like from a string name), everything needs to be defined during compile-time. Or should I use Registry Pattern instead? While we're on the Design Patterns book, much have changed since the book was published. Most of the code example is still using the old C++ way, Modern C++ should make these code cleaner. Furthermore, Iterator was added to Standard Template Library (STL) and there is no need for anyone to implement it manually. I'm slowly beginning to understand why so many programming languages (Java, Rust, Go, and others) were created. Coding in C++ is not, what I would describe, a convenient experiences. I'm still in the early phase of learning, struggling is inevitable, especially you'll need to unlearn quite a number of things from dynamic languages.

#4 ISO standards for programming languages. Stumbled upon this while looking into different standards for software development. Was reading these intensively for the past two months. Seriously, after working for quite some times in development field, didn't realize that these standards exists in the first place. Notable standards are ISO/IEC 14882 (C++), ISO/IEC 9899 (C), ISO/IEC 23270 (C#), and ISO/IEC 30170 (Ruby). Surprise that one particular programming language is notable missing from the list, Java. Did I miss out anything? Nevertheless, standard compliance ensures portability in different operating systems.

Meanwhile, MIL-STD-498, a military standard for system development life-cycle. Superseded by IEEE STD 12207 or ISO/IEC 12007. Yet I'm still enduring the 498 while newer standards already long established. Why? Simply because the documentation is freely available and most academic world still following these syllabus. Standard feel rigid, especially when there are lots of paper works and the development style still following water fall model, very sequentially.

#5 The same thing every single damn year. Generic advice on solving, yet another first word problem, which is just sugarcoating for seeking fortune or fame. Working with younger people have some profound effect on me. How do I regain and reignite my interests on those old hobbies of mine again? You do learn a lot from them but at the same you also see a lot of repeated mistakes. Unfortunately, life moves forward. There are things you must give up as the time or stamina does not permits it anymore. Or it it?

#6 What do you want to learn in 2017 and this is how/now I plan to do it. Yes, another same damn question asked every year, especially the end of the previous year. So many things to try out, so little time. Develop a system and incorporated it into your daily life. Just start? But if you're not finishing, then you're just busy but not productive. Hence, to finish!

This Week I Learned - 2016 Week 50

Last week post or the whole series.

Two more weeks to go before we close the chapter for the year 2016.

Am I a good programmer? Think again, it's not just you but the remaining 99% of developers as well. The key point here is stop comparing, but instead identify the gap, and work out a plan to reduce the gap. This is doable provided that you realize what HN user, socmag advised that "...program if you enjoy it. Everything else will come. Financial reward is a side effect, not a cause.". Otherwise, just do something else. YOLO. Maybe rephrase the question, ask yourself, am I having fun? Need more advice? Read through similar discussions in HN.

Discipline is sustain through repeating a specific behaviour. How can we develop this systematically? Pick and develop ONE habit. Start small and start seriously. Don't overwhelmed yourself. Do it on daily basis and no more zero day. Anything is better than do nothing. Walking is better than sitting at the couch. Running is better than both. While we at it, get consistent sufficient sleep and rest. Try meditation to enhance your awareness and mindfulness as well. Follow the cue/craving -> response -> reward cycle suggested by Charles Duhigg. Do this for 66 days instead of the conventional 21 days. Also, another good write-up on building habit. Good luck!

Learning modern C++? So many resources, unfortunately, mostly are outdated and some still use Turbo C++. It seems C++ also suffered the same fate as Perl, hence, Modern Perl books was written. Then where can we obtain up-to-date information? Arne Metz suggested a few sites to check out for a start.
Follow up on implementing Full-text searching (FTS) in MySQL in week 48. The SQL example given there only suitable for searching exact keyword. What if you want to search partial word matching instead ala SQL LIKE operator? This is possible using asterisk (*) and BOOLEAN MODE modifier. Under this mode, the asterisk (*) is a wildcard operator, as in '%' in SQL. Example as shown.
SELECT name, MATCH(name) AGAINST('bio*' IN BOOLEAN MODE) AS relevance
FROM subjects
ORDER BY relevance DESC

Something interesting on Git encountered this week. As I was git pulling the source, the unpacking process was so slow and I killed it with Control+C. The issue by doing this is that you've a lot of dangling commits or blob.
$ git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (540/540), done.
dangling blob f7c89a6a3fd135a16531bd776ecf04dcc9096cc1
dangling blob c66981a6cc4b877e1fe2064e6423c21831e308b3

To clear these dangling blob, you will need to clean up. Later I found out that unpacking was slow because there are a lot of binary files (graphic files) were added.
$ git gc --prune=all
Counting objects: 953, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (541/541), done.
Writing objects: 100% (953/953), done.
Total 953 (delta 392), reused 498 (delta 204)

Branching is cheap and free for SCM like Git. This is one concept I forgotten and during the last sprint, having two developers working on a single branch maybe not be a good idea unless both of you are can resolve conflicts correctly, do not rebase from master branch until testing, and squash your commit before merging as shown below.
$ git checkout featureX
$ git merge --squash featureX-dev1
$ git commit

Reflection on being a developer after 40. Most of the advices he gave were spot on especially choosing the galaxy (technology stack) wisely and open spaces office is crap. Yes, open collaboration my big foot, open noises would be the right description.

Learning Perl? Need to advance your Perl knowledge? Read Advanced Perl.

This Week I Learned - 2016 Week 36

Last week post or you might want to check out the whole series.

Some findings around the Internet.

XKCD-style graph using Matplotlib? In Ubuntu, you'll need to install these fonts to get the closest possible rendering.
$ sudo apt-get install ttf-mscorefonts-installer fonts-humor-sans
$ rm -rf ~/.cache/matplotlib/fontList.cache

Using Matplotlib without X-server? Switch to Agg backend. Useful when you're rendering image through Docker container.
import matplotlib as mpl
import matplotlib.pyplot as plt

Sigh. Unresolved ImageMagick bug in most recently releases including the LTS, which text conversion still causing core dump. Switching to GraphicsMagick, a fork of ImageMagick did not resolve the issue as command line options have both diverted. My research made me aware that both tools were being used to massively batch process images in a very large scale.

Sometimes, the default Vim configurations/features is good enough without installing buggy extensions. We're relying too much on the external plugins without utilizing the fullest features of Vim itself.

Old time PHP developer switching to Perl? You should read this Reddit's post. The advice given was spot on and correlates with my own personal experience. Nothing against PHP, but in our journey to become a better developer, you'll need to expose yourself to other programming languages and environments. Otherwise you'll end up like those developer who claimed to be a ten-plus years developer but actually doing the same development development work for a year but repeated ten times. I will write another blog post on this in coming future.

"To finish projects on time, start every single step as late as possible" via HN. Full text of all the twitter posts. Catching and provocative statement coming from Tiago Forte, a productivity consultant. Despite the click bait title, HN user, bmh100 interpret his message correctly. Keywords here is "critical path". In other words, is Critical Chain Project Management. Sometimes I wonder is procrastination due to lack of awareness of a task? Or to rephrase it, procrastination is a mindfulness problem? Without awareness, there is no estimation and prioritization, hence the task will be postponed repeatedly or not completed within the time frame?

This Week I Learned - 2016 Week 35

Last week post or you might want to check out the whole series. As usual, some findings around the Internet.

September. It's almost at the end of the third quarter of the year. What have you done for the past eight months? No energy to do anything else after work? Switch. Do important things before work instead. This means you'll need to be a morning person and change your sleeping habits. Let's see how this goes. One small thing at a time but in a habitual and persistent way.

Everyone should be inspired by Norman Borlaug. We need more people like him instead of psychopath who wants to see the world burn.

How to make a copy another hash in Perl? Easy, for shallow copy, just use syntax below. Or simply use the Clone module if you have deep nested hash.
my %copy = %$hash;

Two ways of using grep in Perl, which I always confuse. First, by expression and secondly, by code block. Examples as shown.
if (grep /a/, @cities) {..}

if (grep { length($_) == 6 } @cities) {..}

The strange case of Perl's DBI returning 0e0 (considered as true zero) if zero rows were affected.
sub do {
    my($dbh, $statement, $attr, @bind_values) = @_;
    my $sth = $dbh->prepare($statement, $attr) or return undef;
    $sth->execute(@bind_values) or return undef;
    my $rows = $sth->rows;
    ($rows == 0) ? "0E0" : $rows; # always return true if no error

"MySQL error 1449: The user specified as a definer does not exist." How annoying and rather inconvenient for me.

What are Git's caret (^) and tilde (~)?

This Week I Learned - 2016 Week 03

In case you miss out, last week post.

#1 The Happiness Code. Using rationality to overcome bad mental habits. For programmer, is like identifying the bottleneck of a legacy system and then refactor and optimize it. In other words, hack yourself. I agree with one of the comment, seems like a rediscovery of Cognitive Behavioural Theraphy (CBT) to me.

#2 The Akrasia Effect: Why We Don’t Follow Through on What We Set Out to Do. (HN discussion) Struggle with self-control and making bad decisions against your best interests while knowing it? You're in Akrasia state. Procrastination is an exemplar of such self-denial mental state. There is a step-by-step visual guide on beating procrastination through identifying your motivation. I firmly believe that motivation is related to willpower as written by Roy Baumeister in his book, Willpower: Rediscovering the Greatest Human Strength. Strong willpower correlates with keeping yourself healthy though enough sleep, adequate exercise, and stress management.

#3 Upgrade to Ansible 2.0. Already encountered one showstopper bug, fixed but does not seems release out yet. Also, more explicit deprecation warning of using 'sudo' instead of 'become' as privilege escalation method. Lots of changes needed for my dotfiles using Ansible.

#4 Can't boot into graphical login by default through Systemd and Lightdm seems corrupted. It seems I've messed up my Ubuntu installation after I nuked the Gnome 3 and reverted back to Unity desktop. I'm too accustom to SysV init system and it going to take a while for me to get acquitted with Systemd. Need to remember the runlevels used as runlevel 1 (, runlevel 3 (, and runlevel 5 (

#5 ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded. Weird behaviour when I downgrade from Maria 10.0 to MySQL 5.6, MySQL client login as root won't work. When come to reading multi-pages forum post, never try the first solution purposed. Always start reading from the last page and moving backward. It seems this was due to leftover configuration of MariaDB where authentication using UNIX socket is not enabled by default. Purged both MariaDB and MySQL and installed PerconaDB instead. However, even PerconaDB has its own rather idiotic issue with AppArmor.

#6 The sound of the dialup, pictured. Bring back all those nostalgia memory of connecting to the Internet using your dial-up modem. I still remember the agony and disappointment when the download failed at 99% and can't be resumed. So close yet so far.

#7 We all should get a FitBit or something equivalent. Our body always trying to tell us something but we tend to ignore it. Use this as a monitoring tool to 'listen'. It's alarming that the lack of quality sleep can have such damaging effects to our health and shorten our lifespan.

#8 What 20 years difference makes. With passion, fueled by persistency, and self-exploration and guidance, one can live up to his/her childhood dream. The 10 thousand hours rule at work here.

#9 Working with CSVs on the Command Line. Using common Unix utilities (cat, grep, awk, and the like) to manipulate CSV file. Similar post that describe the usage but grouped by intention. There is also more refine CSV processing console tools like csvtool, csvfiltercsvkit (the equivalent GUI version is OpenRefine), txt-sushi, and tabulator.

#10 Have a Panda's Series or DataFrame? You can sort both data structures either by index, using sort_index() or by values, using sort() or sort_values().

The Case Against Open-Office

"The open office was originally conceived by a team from Hamburg, Germany, in the nineteen-fifties, to facilitate communication and idea flow. But a growing body of evidence suggests that the open office undermines the very things that it was designed to achieve."
"The employees suffered according to every measure: the new space was disruptive, stressful, and cumbersome, and, instead of feeling closer, coworkers felt distant, dissatisfied, and resentful. Productivity fell."
-- Maria Konnikova, emphasis added
Found via HN. Yup, the peril of open-office towards productivity. The main culprit still is the noise, or the distraction caused by it. I've mentioned about this issue few months back and the approaches taken to mitigate this. My current strategies to regain back my productivity are:

First, switching back to headphone. Earmuff did not work for me. Also, installed Spotify and build my music collection. Listening to music while working did help in blocking office intrusion but at a price, prolonged exposure to music may cause long-term hearing damage.

Second, consistent Pomodoro session. 25 minutes coding, 5-plus minutes walking around office area. Seemed to work for me this past few days as I made more commit and felt more productive. This approach off course was to counter the short attention span issue due to noise distraction and office idiocy.

Daily Working Routine

As a person who want to best use of his time, I am always curious about other people productivity hacks. Semih Yagcioglu recently wrote about his daily working routine which is something everyone can learn a few tricks from. Notable activities from his working style.

1. Break your day into morning, afternoon, and night routine. If possible try to slot in 10 to 15 minutes of exercises. Unfortunately I lost my Pedometer (walking steps counter) and now currently saving money to buy Fibit Force.

2. Similarly, I also work in a Timeboxing way or to be specify, using Pomodoro technique. Unfortunately, I do not prioritize my tasks to my liking and occasionally need to "fire fighting", where you caught up in many unexpected, urgent, and sometimes, not important tasks.

His Inbox Zero proach make senses. Any tasks or emails should be acted upon by replying it, delete it, or just delegate it. The 1-3-5 Rule can be handy in setting your daily goals. The Bullet Journal approach its something new for list-maker like me.

3. ZenPen is also something that's new to me. A cleaner version compare to Writer, the online writing tool I currently use.

In short, be aware and keep tracking of your to-do list and make adjustment accordingly. Don't dwell on the technique, focus on your tasks. In coming 2014, going to get myself a smart phone to complement my current pen-and-paper approach, let's see how this goes.

The 555 Notebook

"What is interesting, in these few weeks since I started using the notebook, is that I can immediately see how productive I have been and also the urgency I attach to the items that get written into this notebook."
-- Soo Ewe Jin, emphasis added
Similarly, I am still stick to the archaic way to manage my information, especially my to-do list. All these years of trying Palm, desktop computer, and mobile phone as my organizer, I still revert back my the traditional paper notepad. Maybe is just me, but I always feels more more personal and satisfying to write things down manually and cross them out when done. Furthermore, scribble down your thoughts forces you to slow down and thinks things thoroughly without worry about any battery life.