Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

This Week I Learned 2018 - Week 11

Last week post or something from the past.

Another week, another compilation of vocabulary list. The list of words were a bit tricky to cohere (一致,连贯) together into a convincing paragraph. Just let your imagination go wild then!
The island have been inhabited (居住在) by the isolated indigenous (土著) peoples since long before it was discovered by foreign outsider. Strangely enough, the tribe was hospitable (好客的) and willing to embrace outsider even though there was some resistant initially. People in the island are not herbivore (草食动物) due to the climate and available food source. Within the cold climate with little greens available, tuna fish is their daily source of protein. Tuna fish, due to its distinct smelly fishy odor inhere (存在) can lead to to halitosis (口臭), which can be quite put off to outsider. The people in the island adhere (持有信仰) to a strange religious ritual where they don't inhume (埋葬) the death but instead leave it open in the wild wrapped in Tuna fish skin in a helical (螺旋) way. Everyone was inhibited (抑制) from getting near to the burial ground forever as it will bring bad luck for those who ignore the rule.
看了《港督最後一個保鑣》,戏中的一首“好诗”,搞笑令人佩服。有些戏你要重看几次才能深深体会戏中奥妙。看似喜剧,其实是在挖苦当时朝政。
小樓昨夜又春風,雲雨巫山數落紅。
花徑不曾緣客掃,蓬門今始為君開。
除清衫褲去游水,留得餘香有陣除。
游完上岸偷清晒,行路回家只為貧。
家中只得兩個人,乾柴烈火周身痕。
搵勻唔見杜蕾斯,勇者無懼打真軍。
古來薄幸是郎君,珠胎暗結你鬆人。
有緣千里能相會,可憐已是揼波人(可憐歲月已催人)。
Ask HN: Were we more productive 10, 15, or 20 years ago? The question raised was related to development works itself. Were we? When comes to web development, not really, more marketing hype and too many choices available. Furthermore, too many tools, and too many abstractions. In other words, paralysis by analysis or decision fatigue, which made us ends up doing nothing.  What worse, we were bombarded by so-called news these days which read like tabloid instead. Technology made things done faster but at a price, we're more disconnected and distracted. Or maybe we (those reaching middle age) are more grumpier.

The Pilot System rule. The first system will always developed incorrectly somehow due to lacking of understanding and edge cases. Focus on the programmer productivity instead of focusing on optimizing the system itself.

Lesson learned when breeding Betta fish. We've made a few mistakes by our self and pretty much can relate to the breeder himself.

While we're talking about fish, the best video so far on using salt in your aquarium or towards your fish. We must be using salt wrongly, no salts are created equally, even chemical components are different!

This Week I Learned 2018 - Week 07

Last week post or something else from archive.

Survived another Chinese New Year. Seems like a slow and lazy holidays, nothing much happening these days due to the slow economic. However, lots of catching up in my reading.

Something about my sedentary lifestyle. It seems I'm quite active on Thursday, Friday, and Saturday. Can't recall what I did during Thursday. Will keep monitoring this to bring awareness so I can reach on average, 6,000 steps per day.


Productivity is not equivalent to learning. Yes, as Won Cho discovered of one month of writing down everything he learned during code. You need to find a way to balance out and achieve both goals. The discussion in HN was more towards methods on learning like spaced repetition. One key insight was reading or scanning through site like HN is not learning, that is consuming information. Similar to digesting entertainment news. Similarly, my TWIL is just a journal of my notes of something that interested me and mindless rambling.

The Kubernetes Effect. (via HN) Again, containers is not silver bullet, just use a real PAAS and solve your business problem first (bring in the moolah!). Remember that an software architecture is a reflection of an organizational (which is really a communication) problem. Yes, we know it's very tempting to use the latest greatest stuff but seriously, do you really needs microservices? Are you Google or Facebook scale? If not, just stick to monolith architecture! Don't start with me on the complexity of front end development these days. While reading through the comments, I've learned that JEE application server is just an OS with containerized applications.

Have a few discussion with a local breeders. My observation leads me to believe some of these breeders only breed occasionally but also a reseller as well. They restock from larger Betta farms at a lower value (due to lower grade) and sell it at a margin for profit. But profit is quite limited just from selling fish unless you breeding for large volume or only exotic species. To compensate that, some breeders switched to sell accessories (nets, tanks, or medication) and aquatic live foods (blood worm, miona, vinegar eels, or others).

Betta fish or any ornamental fishes needs lots of attention and details. A slight overlook can either kill the fishes or even the whole spawn. We have lost four although we've procured eight more this week. Our initial investigation must be due to cross contamination due to sharing of aquarium siphons. The next step is to monitor the water parameters or switch to Indian almond leaves (lower pH and antibacterial property) or Banana leaves for all the tanks. We will wait and see how the new batch adapt to our new approach.

This Yahoo Answers post have gave the best advice I've read so far on Betta fish. We do agree with most of the the insights shared by the poster. Definitely a post to revisit from time to time.

If anyone going to ask me about MongoDB again. This will be my one sentence answer. It's a web scale database that successfully exploiting the "hype first, feature later" strategy. Yes, I just repeat what others said online again and again to deride MongoDB. Thinking of upgrading or using it, just wait for Jespen audit reports.

Curated list of Perl stuff. What the different? It's almost the same for all programming languages?

Dtrace switched from CDDL to UPL license. Too little too late?

Success in software project management? The quote below illustrates the insight succinctly (emphasis added). Or screw any methodologies, just follow the WhatsApp approach (YouTube video).
"small teams made up of scary-smart accountable people, given a well-articulated objective (not solution) and are left alone without distraction"

This Week I Learned - 2017 Week 50

Last week post or something from the archive.

Two more weeks to go and we can start the new year. Meet quite a few talented and inspiring people around. Wish I pick up illustration at a younger age. It never too old to try venture into something totally new.

The Second-system effect, where simple and efficient system was replaced by over-engineered systems due to personal agendas, preferences, and career advancement. The Mythical Man-Month book is within my reach and every time I saw the book cover, it reminded me of the profound insights of Fred Brooks. The Hack story at Facebook done everything correctly and to prevent such effect (Facebook should have just buy Zend last time and replace PHP with Hack instead). Software architecture is more leans towards theoretical, common sense, and management rather than practical hands-on stuff. Most of the recommended reading literature indicate this.

PostgreSQL Exercises. Yup, someone have helped me to check off one item of my bucket list. PostgreSQL should gain more traction and exposure comparable to MySQL. I'm glad someone made some contributions towards that direction. History always repeat itself, this time, unfortunately, the worse (MySQL) is always better.

License compliance. A concept so foreign for so many software house, let alone those startups or companies without even a human resource department.

Not really time management but mission, GTD, energy management, and automation.

Three girls in kitchen by William Gedney via (RD). When times were simpler and photography was manual, constraints, limited, and more humane. Roger May have a good write-up on his photography works.

Embroidery, potential new hobby for the coming new year? Example of a work (screenshot captured and cropped by me) by glazier-heart shown below. Not that hard, you just need patience and tracing ability. What if you combines your masterpiece with sarcasm and cynicism? Surely it going to be an awesome gift. Note to self, remember the Wheaton's Law.


This Week I Learned - 2017 Week 43

Last week post or the usual archive.

Lots of things I've learned and shared during the week. I sincerely hope the young lady who is starting a new chapter in her life is going to learn to invest her money wisely.

Seven years ago, there was one technical question that still lingered on. Due to some unexpected coincidence, I managed to revisit and solve it. The lesson learned here is given any web application performance problem,  if the bottleneck issue cannot be optimized further and the programming language lack of or stable support for asynchronous model, just delegate it to a message queue system.

Do you have the Learners Syndrome? Yes I do.

Where Do Old Programmers Go? The best, funniest, and sad answer is "They don't Go anywhere, instead they Rust?". But one question still remains, as Slashdot reader puts it (emphasis added by me). In the end of the day, is between money and legacy.
"Another who used to be self-employed coding for people on a consulting basis told me he got into woodworking, eventually. His reasoning? As you get older, you start asking yourself questions like, "What have I created that will be used and enjoyed by others even after I'm gone?" It's easy to sink years of your life into a software application, only to find that in a decade or two, nobody is using it anymore. It's become "old and obsolete". If you build good quality, hand-crafted furniture pieces? They're quite likely to be used for 100 years or more. Build a dresser for one of your kids and they may even be handing it down to THEIR kids."
How to write efficiently. Keep it short and simple.


Scott And Scurvy. Really long but worth going through the whole essay or you like the YouTube version of it. So much wasted efforts on focusing on the wrong stuff than we should just focus more on the medical and scientific research. Scurvy is a curable disease due to lacking of Vitamin C.


This Week I Learned - 2017 Week 27

Last week post or something from the archive.

One of the biggest item in my to-do list is getting closer to be checked off. If everything goes well, the pain in the butt for the past eight years will come to an end. It didn't work out the first time but I've learned my lessons when I went in for the second time. Will I ever do it again? Definitely. Without a doubt. But in a more manageable way.


You have too much shit. That what will happen if we fall prey to our own fears and deepest insecurities which lead to we hoarding insane amount of unnecessary stuff. Give, sell, share, digitize, fix, or destroy these stuff. This problem wouldn't exists if we don't buy stuff in the first place. However, living in the digital age, we also have another form of too much digital shit, some are due to data hoarding.


Contrary on what I said about not getting new stuff, I was thinking of getting another ThinkPad, for another more portable machine. X220 seems like a decent choice. It's relatively new, affordable, upgradable, and furthermore, almost waterproof, as shown in video below.



Who Americans spend their time with? (via Slashdot) Nothing unusual about this. As you age, the time you want to spend with your family (especially your partner) and yourself increases accordingly. Occasional happy hours with co-worker is acceptable to a certain point (you've spent more than 8 hours per day with them anyway), but most of the time, you just want to go home and be left alone.


How to read and understand a scientific paper: a guide for non-scientists. (via HN) It a long tedious process and normally you won't get it right the first time and may need to sleep to digest the information subconsciously. How I wish I've all the times to read up those pending research papers. Maybe I have the time and motivation for the second part of this year. Again, there is always this guide on How to Read a Book, which can be useful to apply to different reading materials.


What habits make a programmer great? Some said is the three virtues of a programmer, laziness, impatience, and hubris. However, on a personal level, basically is can be summarized by thisthis, and this comment. Nothing but take care of yourself, be healthy, sleep well, eat well, manage your stress. Never take any emotions from work back to home. What ever stays in the office, stays in the office. Generally, it can be applied to any professions.

This Week I Learned - 2017 Week 21

Previous week post or the whole series.

If you cannot keep your habit in a consistent manner, you will need readjust the minimum goal of the habit until there is no more excuses for you not to do it. Is as simple as that.

Second week of eating your dinner before 7pm indeed have significant changes. Additionally with consistent meditation and healthier food choices, surprised to know that I've lost some weight. However, all these lost weight may due to water weight.

#1 Well said. Well said.
"Don’t confuse privacy with secrecy. I know what you do in the bathroom, but you still close the door. That’s because you want privacy, not secrecy."
#2 Interesting that it's not just me who have been doing my own TILs or keeping a developer journals. While some store their TILs in Github repositories, mine just as a weekly collective of blog post. Either way, keeping a journal is always a good habit for anyone practicing their craft.

#3 There are quite a few complimentary Docker utilities that help to improve your Docker usage experiences.

#4 Tracing in GNU/Linux. Always an interesting topic to explore, especially coming from Brendan Gregg.

#5 Managing Git merge conflict? git-mediate seems like a good tool to ease the pain of resolving merge conflicts. I now finally grok how three ways merge works.
  • HEAD - Your changes.
  • BASE - Code before your changes and other branches.
  • OTHERS - Code with other changes that going to be merged to your branch.
#6 Merge with squash. Good to know if you want to do lots of branching.
  • Put the to-be-squashed commits on a working branch (if they aren't already) -- use gitk for this
  • Check out the target branch (e.g. 'master')
  • git merge --squash (working branch name)
  • git commit

This Week I Learned - 2017 Week 17

Last week post or the whole series.

What happen to software developers who are still coding in their 40, 50, and 60?  What will happen in the next 22 years will be an interesting and unknown territory for older programmer to explore. There is always the case of how to do keep improving or how can we be a better programmerKaizen. Continuous improvement through through learning with understanding and stay healthy, both physically and mentally.

Complacency is your worse enemy when come to learning. We take it easy, do not dare to explore out of our comfort zone and afraid to look stupid. We know if we're heading this path, we will stuck forever, basically doing the same thing every year. Hence the developer with ten years experience but doing the same thing every year. Yet, we're afraid to start. Keep waiting for the right moment, the right motivation, and so no.

The older I get, the more I realized that motivation is fleeting and only discipline is reliable. Motivation is based on feeling where discipline is based on your habit. Best to cultivate good habits rather than waiting for the right feeling to come. Nothing but one step at a time.

#1 RIP Robert Pirsig. (via HN) Yes, he is the author of the cult book, Zen and the Art of of Motorcycle Maintenance. Interesting write-up on him during his day at spent in Banaras Hindu University (Varanasi, India).

#2 Good write-up on being a serious code reviewer. Only professional developer will take their code review session seriously as both parties, the reviewer and the code will learn something out of the session. The main obstacle is always how to handle it in a objective manner. Sometimes developer forget that you are (as a person) not your code. It's always a tricky situation.

#3 Sometimes, certain websites could change your life. No surprise some sites from are Ask Metafilter. All these reminds me of the web of the '90 and the time spent on aimlessly browsing through each pages. This is before RSS was even a thing yet.

#4 How many ways to execute your script parallelly? Three. Using wait, xargs, and GNU Parallel. The last one is the most comprehensive, featureful, and still being maintained.

#5 How Technology is Hijacking Your Mind. The prevalent tactics on manipulating our surfing behaviour. Throw in some dark patterns, we're basically somehow influenced to a certain agenda and direction. Given the ubiquitous Web and the Internet, how do we anticipate this manipulation? For a start, digital detox is a good start but still, this is not a long term solution, especially for those working in technology sector.

#6 Real-time Programming. (PDF) A course in learning about programming embedded real-time system.

#7 Is Perl still a good choice for web development? Yes and no. If you're not inheriting legacy Perl project, switch to something else more modern. If you're stuck with CGI, move to CGI alternatives like Mojolicious, Dancer2, Catalyst, or PSGI.

#8 Virtualization in GNU/Linux. Good introduction of different virtualization technologies available that we can use.

#9 The web is not desktop applications. Well said. Well said.

This Week I Learned - 2017 Week 11

Last week post or you can read through the whole series.

Readjust and swapping some my morning and night rituals. I've managed to clear of daily to-do items in a more manageable and less stressful manner. It's amazing that a small change can have a significant impact on your daily life.

#1 What is the best time to have breakfast, lunch, and dinner? McLaren's F1 driver diet plan provides some good reference plan. Breakfast starts at 7 am, follow by lunch at 12:30 pm, and lastly dinner at 6:30pm. Interestingly bedtime is around 10pm, seems way too early. However the total calories is quite high, roughly 2800kcal. Best if you check your daily needed calories.

While we're on calories counting. Someone managed to lose 45kg in 6 months (via HN). Be warned, his approach is quite drastic and not suitable for everyone. Similar posts (here and here) in HN.

#2 Dynamic Dispatch and Jump Table. I've been stuck with a problem of implementing console application in C++. Countless hours of searching and reading and it finally occurred to me that I was googling for the wrong keywords. Unfortunately, my limited knowledge with C++ hamper the progress of the project. Some discussions with two young chaps did open up possible solutions on how to implement Jump Table in C++. Will explore further once everything have been settled down.

#2 Learned optimism as presented by Reginald “raganwald” Braithwaite. Good to read slide and watch the presentation together. The audio quality is kind of lacking. To be more optimistic, use Cognitive Behavioural Therapy to change the way how you explain things to yourself.


#3 Cultural fit for a candidate in a company. The ironic, bitterness, and sarcasm. The comment by sokoloff is spot on. It should be a mutual process, both the candidate and the company. And it should be the responsibility and challenge for the management rather than those reluctant employees. Interestingly, there is only three interview questions to assess whether a candidate is suitable for the job.

This Week I Learned - 2016 Week 37

Last week post or the whole series.

As we're moving to the end of the third quarter of the year, more things pop up for me to follow up. Interestingly but not surprisingly, life is as monotonous as ever. Yes, it can be routinely, but that probably the only way, through sheer discipline, to follow through your plans.

The components for setting up my homelab using AMD 5350 have been bought and set up accordingly. The only remaining tasks is to install the necessary OS and configuration. More writeups on this in coming future.

As usual, something I learned this week.

Looking into Makefile, specifically GNU MakeExtracting parameters from target? Yes, is doable but it's not pretty. See code below. If your target is not an actual physical file, make it a '.PHONY' target instead. Otherwise you will encounter "No rule to make target" error. Next, we will need to 'eval' when extracting the assigning the parameters passed, otherwise the 'PARAMS' assignment will be executed as command.
.PHONY: action

action:
    $(eval PARAMS := $(filter-out [email protected],$(MAKECMDGOALS)))
    @echo $(PARAMS)

Interestingly, there are four ways for variable assignment in Make. The 'Set If Absent' way of variable declaration and initialization is quite handly. Funny though, Perl, which is known for its brevity, does not have such language construct.
# Lazy Set. Value is expanded and set when used.
FOOBAR = x

# Immediate Set. Value is set when declared.
FOOBAR := x

# Set If Absent
FOOBAR ?= x

# Append
FOOBAR += x

Write it down, make it happens. Never underestimate the power of writing. Sometimes, the pen is mightier than the sword.

'git commit --allow-empty'. My goodness! I'm not aware of this option exists in Git. How many times I've adjusted a space just to create and make an empty dummy commit. While we on Git, if you seems to "misuse" it somehow, there are many ways to recover back.

Web development is a layer of layer of layer of abstraction hacks? I firmly believe. It's messy, plagues with multiple choices, and feels like wild wild west. HN user, meredydd mentioned that modern web application today consists of five programming languages and three frameworks. Interestingly, I never realize there are so many choices. Maybe future Javascript, ES2016 can reduce that paradox of choices by standardizing on using the same language for frontend and backend, as in isomorphic Javascript? But that also raises another interesting question. Is web development a constant rewrite of existing application to newer technologies?

This Week I Learned - 2016 Week 26

Last week post or the whole series.

What the difference for the Git config option of 'push.default'? To prevent yourself from committing and overriding local branches to remote branches, stick with 'simple' way of 'git push'.

Why you need to support Perl's PSGI?

One of the dilemma faced by any programmer, what should I program? (via Slashdot) Someone if the forum joked that "I know how to post a comment, but I don't know what to say." Funny indeed but true as well. Yes, you can learn one programming language per year, but in the end, it will be quite a waste if nothing is created.

12 years of web programming (via Reddit). Sad but true. Layer of layer of layer of abstraction which in the end, just to produce HTML.


Another approach of subroutine parameters validation in Perl. This is from REST::Client. "Tim Toady" at work here using Carp module.
croak "REST::Client exception: First argument to request must be one of GET, PUT, POST, DELETE, OPTIONS, HEAD" unless $method =~ /^(get|put|post|delete|options|head)$/i;
croak "REST::Client exception: Must provide a url to $method" unless $url;
croak "REST::Client exception: headers must be presented as a hashref" if $headers && ref $headers ne 'HASH';

This Week I Learned - 2016 Week 23

Last week write-up or you might want to read the whole series.

Calculate the power supply needed for your Power Supply Unit (PSU). It seems that my HP Proliant ML110 G6's PSU of 300 watt seems sufficient enough. Maybe the issue is with the power socket or adapter? Next step, install different operating system to test it out. Or maybe I should proceed on building a HTPC instead? But find the required parts is quite an frustrating process. I've never realize that quite a lot of product, for example, casing is not available in MY.

AMD Athlon 5350 Kabini Quad-Core 2.05 GHz is my favourite CPU processor (or APU to be exact) right now besides the XEON X-series. This is a very unique processor that sits between 5150 and 5370 but that supports virtualization extension (AMD-V). Hence, this processor is suitable for building your own homelab which fully utilizes the quad-cores for virtualization. Furthermore, the power consumption is 25 Watt TDP. However, the motherboard choices for AM1l is quite limited but so far only Asus AM1l-A seems to support ECC Ram or not?

One good example of using this processor is building a pfSense firewall. Why one want to build and setup a homelab? Well, if you want to be a full stack engineer or just having some fun building a machine.

As it's very hard to find a single 5350 in MY. The next best option to go for A4 5000, which have similar features to Athlon 5350 but lower clock speed. The only available APU option right now here is BioStar A68N 5000. While having higher TDP, it's still a preferable choice when compare to Celeron J1800 or J1900 for its AES encryption support and less painful VMWare's ESXi installation.

How to teach yourself programming. Learning a new programming language is never hard, you just have to use it on daily basis and experienced the whole eco-system.

Something more about Perl. The official Perl's Docker image is up (via Reddit). So right now, we can have an isolated Perl environment for customization and development. So many things I want to try out, for examples, Moo (Minimalist Object Orientation), DNSMadeEasy Webservices API, and try to figure out how to define and use constant properly in Perl.

While we're on Docker, it seems the default Docker installation in my Ubuntu 16.04 cannot be executed by non-root user. To enable this,
$ sudo groupadd docker
$ sudo gpasswd -a ${USER} docker
$ sudo systemctl restart docker
$ sudo systemctl status docker
$ newgrp docker # no need to logout and login again
$ docker version

Chromiun OS for Single Board Computers (SOCs). Is time to use back the shelved Raspberry Pi 2.



This Week I Learned - 2016 Week 17

Write-up for last week or you might want to read the whole series.

Busy week, didn't follow up with anything else. Nothing but reading and writing papers.

Being a developer after 40? (HN thread) Are you too old for development? Nope. While general consensus is that if you over 35, you should either be in the management, start your own company, or be a consultant. But why you want to move on to something else? There is still so much to learn. Have fun, rest well, and keep yourself healthy. The first post of the discussion may shed some lights on the actual reason why organization are reluctant to hire more experience (often correlate with age) developer.

Learn a new technology each week in 2016. Awesome weekly project! Unfortunately, most of the project are written in Scala. Not that I've something against the programming language, but I've painful and dreadful slow experience setting up both Scala and Play framework. The main culprit is sbt, the interactive build tool. The number of dependencies to be downloaded in order to get sbt to work is so painful huge is like you're downloading the whole Internet. Furthermore, you really need a powerful development machine to do any development work in Java-based platform.

Pandoc (the universal document converter) with Markdown is awesome. But no one still can solve the annoying problem of making it easy to create a simple table. 

Why isn't Perl more popular? Reasons? Perl is a glorified AWK. The TMTOWTDI motto. Osborne effect of Perl 6PHP, the simplified version of Perl took over the web and dethroned Perl. No killer apps (like Rails for Ruby or WordPress for PHP).

This Week I Learned - 2016 Week 01

In case you miss out, last week post.

#1 Flowgorithm: Flowchart Programming IDE. Creating application using simple flowcharts, yet another level of abstraction for coding. Screenshots, step-by-step tutorial, and file format. Similar flowchart-based programming environment tools are RAPTOR, Visual Logic, and LARP. Unfortunately Windows only (should try with Wine). Flowgorithm is written in C# and most probably can run in GNU/Linux since .NET Compiler Platform ("Roslyn"), the compiler for C# and Visual Basic has been open-sourced. If there any tools to do the reverse or something like Visualize Python which let us visualize the flow from the source code instead? Well all the mentioned tools catered for educational purpose, is there anything similar for the industry like those for Model-driven engineering?

#2 How to think visually or rather, which visualization diagram should I use? Which reminds me of another visual decision tool, the chart chooser and slide chooser by Andrew Abela and Paul Radich. I always interested with visualization tools as it's a form of storytelling with data. I've been exploring different chart tools these days to plot my daily walking steps.

#3 Dummy output sound adapter in Ubuntu? Nothing but a force restart (pulseaudio -k) of PulseAudio sound server can't solve. It has been so long since I last encountered any sound card issue in GNU/Linux. I still remember many years back I tried, for weeks, to get my sound card to workonly to realize that I picked the wrong driver for the Linux kernel. Although the is a Yamaha sound card, the driver only works with the chipset, if I remember correctly, Cirrus Logic.

#4 DNS Conformance Suite and Test Harness. Conformance or to be exact, conformance testing, "is testing to determine whether a product or system or just a medium complies with the requirements of a specification, contract or regulation". Enormous list of Request for Comments (RFC) just to make sure that the DNS implementation conformance to the standards. Standardization is always tricky where so many parties involved and each with their own agenda which sometimes, slow down the the adoption of the certain standards. Case in point, Hyper Text Markup Language (HTML).

#5 Software Testing Techniques. Class Report for 17-939A (PDF) by Annie Lu Luo. Comprehensive literature review of software testing techniques. So far, the best paper I read in 2016. How I wish all the software engineering papers were written in such way. Again, this remind me of Ke-Sen Huang's resource for computer graphic page. Unfortunately my lack of mathematics knowledge and patience prevent me from fully understand most of these papers. Nevertheless, you can appreciate the beautifully generated images of these computer graphic research papers. And off course, there is this Papers We Love, where a group of people who love to read academic computer science papers. Unfortunately, as usual, there is still MY chapter and judging by all the past meetups, its existence will not sustain for long.

#6 Books Scientists Should Read Before The Age of 20. Some books are questionable but nevertheless, a good starting list. Personally, I will like to start with George Pólya's How to Solve It: A New Aspect of Mathematical Method. If you're short of time, here is the summary of his method.

#7 100 Days of Swift. Progression notes on learning Swift programming language. Compare to other self-learner, he managed to create interesting UI related small projects just by applying a few concepts. Something that anyone should try out when picking up new programming language.

#8 Write code every day? Not necessary, as fellow redditor, EarLil advised that just "follow your rhythm and stay healthy" (make sense but which rhythm?) or you can just switch between coding and writing, "code doesn't have to be code". Github commit heatmap is a good motivator to encourage you to make an effort to write or code something, even one-liner. The question remains? How long should you allocate time in a day so that it will get you started and won't burn you out? For me, one line of record or code, or a sentence. Something so easy that you don't have any mental excuses not to do it. Getting started is always the hardest. But once you've started, everything else will fall into places. Just start!

#9 Valuing time over money is associated with greater happiness. First empirical evidence that people who value time over money are more happier. This reminds me of the personal finance book, Your Money or Your Life, where the authors asked "how much that we have trade our hourly life energy for money?". Once you realize that the actual amount of cost, time, and effort spent just to earn an hourly wage, you will have a change of opinion regarding your career and the money you earned..

This Week I Learned - 2016 Week 00

Happy new year, 2016!

Inspired by Christian Neukirchen's blog, Trivium, where he curated interesting stuff about technology, mostly related to programming. I will start something similar but not limited just to programming. Instead of storing all those things I've stumbled upon as bookmark, in Google Plus' collection, or in my paper journal, why not turn it into an "essayish content"?

I didn't blog that much in 2015. Comparing to the previous years, which I vowed to write on a near daily basis, I blogged sporadically without any specific topics. Just mindless ramblings following the current technology fad, mostly those in Hacker News. Also, my writing style change. I tends to write longer post these days or rather, I've become wordy. Maybe the migration from Google Plus to Blogger caused that. It feels weird to write short blog post in Blogger. Contrary to what they said, especially in photography, the tool is as important as the doer.

A weekly post sounds reasonable. Most probably on every Saturday. Or Sunday if something come up a day before. That means I should have a minimum 52 posts by the end of year 2016. And additional few posts in between. A good baseline figure to motivate yourself to write even more. When comes to writing or reading, quantity always triumph quality. You always need more deliberate practices and discipline to master any skills.

Or maybe because I miss Memepool?

Without further ado, I present you the first post of this week I learned.

#1 Scott Meyers, the foremost expert on C++ programming language, announced that he is retiring from it after 25 years of involvement. Quarter-century is a very long period for anyone to just focus on one particular programming language. Especially to resist all the temptation of chasing the latest technology fad. The discussion at r/programming regarding his retirement is both funny and interesting. Some speculated that his next step. Maybe he is moving to Golang (due to title of the blog post), Ceylon (from his past posts), Node.js (I doubt so), Swift (possible), or Rust (another possible candidate)? Nevertheless, C++ always remains one of the item in my someday list (to-do list for procrastinator).

Some interesting tidbits about him. He has a consistent and unique hairstyle. There is even a poll on his hairstyle resemblance to famous people. The funny thing is I always mistaken him for Bertrand Meyer, the creator of Eiffel. Also, besides Philip Greenspun, he is the second technical people I'm aware of who seems to have a deep connection to their pet dog.

#2 Matt Might blog post on 12 resolutions for programmer should be reread annually during new year. I've covered this in the past, around 2013. Rereading his post and comparing to what I've done for the past two years, it seems that I didn't manage to pull through of the resolutions. Something I learned last year, discipline and persistency always outweigh passion. Also one mistake I've made was that you can't multitask your goals. As stated in his blog post, this is a "twelve month-size resolutions". Meaning that you should carry out one resolution at a month. This is akin to changing a habit, one at a time, for one at a month. Sometimes you've to slow down in order to move faster. One issue still remains, which can be summarized from HN discussion, sedentary life style is a huge health risk for IT jobs like programmer and system administrator.

#3 There are 64 GNU/Linux or Android friendly Single-board Computers(SBCs). Overwhelmed by the number of choices? As shown in the survey results, you can't go wrong with Raspberry Pi for its software support and community ecosystem even though it has lower hardware specification. For my case, the main reason is the pricing as I can procure both SBCs from the local element14 (electronic components distributor) site. For other SBCs, the shipping fees, tax, and delivery time does not justify it. Otherwise, I would have go for Odroid especially Odroid-C1 and Odroid-XU4. Adapteva's Parallella, marketed as mini supercomputer, caught my attention but the price and its usage, again, does not worth it.

Decomposition Technique

Decomposition is one of the important skills for a programmer as we need to break any problems into smaller and manageable chunk. Bumped into this top-down approach on achieving that. Step as follows:
  1. Describe an overview of the problem in your head, with words.
  2. Try to write code that is the closest to those words
  3. For every unimplemented thing, repeat until done.
Pay attention to step 1 and 2. If you can conceptualize the problem and solution in your head and describe it in most layman term, surely the code produced will be easily understandable. As they said, good programmer are good writer or rather good communicator, they can convey their ideas across.

Similarly, another approach is to use reference pattern or application architecture. But this is at different scale, more of the overall architecture. Example is Command Query Responsibility Segregation (CQRS) which is an alternative model to CRUD model. Still reading and try to learn other approach than CRUD.

Breaking into Programming

"From time to time, I run into people who are interested in breaking into programming. Last night at the company holiday party a guy (we’ll call him Sam) walked up and introduced himself, asking for advice on how to move from his current role over to development. Sam’s attitude impressed me – guys with a genuine desire to learn go places quickly. And on many occasions I’ve hired someone very green simply because I could sense a genuine interest in the craft and a hunger for knowledge. I’ll take attitude over aptitude."
-- Cory House, emphasis added
Same opinion here. Genuine interest and hunger for knowledge are the first two of out of four (more on that later) important qualities for newcomer in programming profession. Why so? Simply because all programming is generally maintenance programming, you will read more than writing code, especially by others, and you're going to hate what you've encounter. Unless you've genuine interest to sustain your motivation, otherwise it will be mundane, stressful, and soul-crushing.

Why all the negativity towards software maintenance? When you're taking over a legacy software project, you're going inherit all the unfortunate consequences that come with it. Undocumented business rules, inconsistency coding style, lack of or the abused of version control, no testing, no database referential integrity, big table (not the NoSQL storage but one table with > 50 columns), disgruntled stakeholders, and more are the typical encountered situations. *The most painful part is you're enduring all these due to the management or technical decisions made previously which you've no part of making and influenced.*

Which is why, as I observed, there exists a special group of developers or freelancers that focus on hacking the stuff up fast and move on to other projects and companies without doing any or minimum maintenance. These people know they're hacking stuff up and they know the happiest way is not to maintain it. Honestly, I don't blame them. Most stakeholders deserved what they're requesting for, something that is developed fast and cheap. Later, they will hire another bunch of people to maintain it. Off course, they will keep asking why is it so slow and expensive to churn out another feature. How can you move fast forward when you're paying technical debt? Nothing against this approach, fast and cheap works well for a startup which want to test the market with a Minimum Viable Product (MVP).

Back to the two other desirable developer traits. First, humility or as what what Edsger Dijkstra argued, accept your brain limitation, be a humble programmer. Let go of your ego, someone out there is worse or better than you, no need to be smug and insecure. Embrace and improve upon your incompetence, learn from them, let them inspired you. Find the gap and fill the void. Furthermore, can-do attitude doesn't means say yes to everything. Is okay to admit your cannot-do anything.

Second, empathy, the feeling of being in others' shoe. Keith Wesolowski recently stressed that "empathy is a core engineering value" which I believe, is something to be instilled into every developer. Understand your user pain, optimize and automate their works. Follow the coding convention, write proper documentation (the business rules or the whys), and be helpful to your fellow programmer.

In short, ask yourself, are you genuine passionate about software development, love learning, humble, and empathy person? If so, maybe this profession is right for you.

How to design a class?

"Start with the simplest thing that works. That thing will probably be just a function. Grow it from there. If it gets too big, split it. If you find that you pass the same 12 parameters to a bunch of functions - factor out a class. If you do the same thing in a bunch of classes - abstract it out. Keep it DRY. Keep it SOLID. Rinse and repeat. This way you end up with a useful class hierarchy - and OOP won't be awful."
-- azov, emphasis added
I like his approach, build working stuff incrementally, from procedural towards Object-Oriented (OO) design when needed compare to the more theoretical and classical way on how to design a class. Way more pragmatic for those coming from more procedural experiences. Based on my observation, some programmers still struggle on adapting an OO mindset. There is nothing wrong with procedural approach but if you're using a framework, at least try to understand and follow the underlying OO structure.

Imperative and Dclarative Programming

Imperative. Think PHP programming language. You give command and tell the computer how to do things step-by-step. Is like a driving instructor teaching a person how to drive.

Declarative. Think SQL. You tell the database what you kind of result you want and don't care how the system do it. Is like asking a taxi driver to drive you to your destination.

MUMPS

Via HN. If my memory serves me correctly, few years back, someone (a sales dude) used to come to #myoss  meetup and talked about Multi-User Multi-Programming System (MUMPS), a programming language with embedded data storage. A very old (since 1966) programming language within a niche domain, mostly in healthcare. Suspect some of the healthcare system in .my are still using it.

I am wondering, what are the other exotic programming languages still being used in here ? For banking industry, I think Cobol and RPG are still quite common. What else?

Learn X Programming Languages in Y Minutes ?

Is it that easy to learn any new X programming languages in Y minutes ? Maybe. If you already know how to code and the new X share the similar syntax and programming paradigm. For example, is easy for a PHP programmer to pick up Java or vice versa as both are C-based programming language with very similar syntax. Not so with learning Erlang as a PHP programmer. Not only you're moving to a different programming paradigm (functional in this case), the syntax itself is way different and not beginner friendly.

Even if you can code and pick up the syntax fast within Y minutes, you will need many years before you can truly master the language itself. Initially, you can read and understand the code but still can't do anything useful with it. As you progress, you will start to write many small programs as well as experience (unfortunately the hard way) the quirks and gotchas of X. After years of continuous usage, you may (some may not) reach to a phase to write in X idiomatically.

In my case, I am having a tough time (myself to blame) switching to Python from PHP. Experience is a double-edge sword. When you code in Python, you have to rewire you brain to think differently, in a Pythonic way. Imagine the frustration when you felt slow, clumsy, and constantly want to revert to the old ways. Unlearning any habits are never easy.

How to solve this? Stop learning syntax and write small program. Build something, build something relevant to your interest.