Showing posts with label pattern. Show all posts
Showing posts with label pattern. Show all posts

This Week I Learned - 2017 Week 29

Last week post or some ramblings from the past.


The quest of finance independence will influence or make your adhere to different life principles. Minimalist life style, waste free, child free, debt free, and other approaches. Some of these deliberate choices may against the normal social norms. Is all depends on how aggressively you want to proceed ahead. The biggest obstacle is consumerism, especially in this digital age. Reducing your social media usage (yes, this includes normal Internet surfing) is a good start.


Interesting part that the WiFi extender cannot connect through 5GHz because certain countries does not support channels other than Band 1. It's quite confusing where extending your WiFi coverage if you're using the same SSID as you have to check the BSSID to differentiate which SSID you're currently connecting to. But one thing for sure, I definitely love `nmcli` console tool, probably my favourite software. Always gave me the hidden surprise of its usages and features.
$ nmcli -f BSSID,ACTIVE dev wifi list


Nostalgia bucklespring keyboard sound. Instead of spending a fortune in getting the real physical keyboard, just install the software and enjoy the emulated sounds. Good for the electric typewriter I was thinking of setting up using the underutilized Raspberry Pi.


Chinese cleaver (菜刀), compare to other similar type, is a general purpose kitchen knife.


"We receive subsidies from the government." (more write up from MiniMachines). Now we know why Orange Pi is so cheap, everything is sold as Bill of Materials (BOM) price. It would be nice if the software support is better.


Why you should not use React now due to the the BSD+Patent license issue. Partially open source but with patent grant issue tagged along. Are we going to see more PATENTS file issue in coming future?


"Being unwilling to adopt a necessary amount of structure and process is just as much of a hindrance once you hit a certain size." Full context of the discussion. The observation when you organization reached certain size where formal process is unavoidable. Yet, people are still making the same old mistake over and over again.


Using Linux kernel >= 4.9? Switch to BBR TCP to control the network congestion and increase your Internet speed. It seems to increase the download speed tremendously. Alternative and more detail explanations from APNIC and ACM Queue.


The secret passion of Git checkout. Funny but very well-written guide on using Git checkout. Meanwhile, use rebase by default, if possible for all your branches. While we at it, user `merge --no-ff` if possible because we want to preserve the branch history.


Kindness is underrated (via HN). Being polite, empathy, professional, helpful, or kind? Neither one will get the message across if the receiving end fails or unwillingly to listen. I totally agree with the comment, "On the internet, nobody can hear you being subtle".

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.
set(CMAKE_CXX_STANDARD 11)

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/stree.cc.o -c /home/ang/src/stree/stree.cc

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 06

Previous post.

#1 PatternCraft. Learning Design Pattern through StarCraft. Never underestimate the importance of Software Metaphors in abstracting software engineering concepts.

#2 Ask HN: Best curated newsletters? Need a way to reduce your time from the net but at the same time still fear of missing out? Pick your favourite curated newsletters. Cron.weekly seems to have plenty of links which I've found interesting if you're looking into system administration. Mandarin Weekly caught my attention as well.

#3 How Git Merging turns you into a GITar Hero. Till today, I still don't understand why developers still fail to see the benefit of Git Rebasing. Maybe the complexity of the merged trees indicates productivity or sense of accomplishment? You know, software engineers tends to over-analyze and over-engineer.

#4 Linux Performance Analysis in 60,000 Milliseconds. Using uptime, dmesg, vmstat, mpstat, pidstat, iostat, free, sar, and top command, you can have an overview of the resource usage of a system. Don't want to go through the hassle of all these commands? Just use Glances, web or console-based monitoring tools written in Python. Perhaps, htop, an interactive process viewer or iotop, disk I/O status monitoring tool.

#5 Ping Sweep. Fun activity to do with nephews during CNY. We all learn how to find all available hosts that were connecting to the Access Point (AP). From the list of IP addresses, divide the these these hosts into mobile and computing devices. Have fun times scanning the network where they both overloaded the Wifi router by "nmapping" the network. The seed of learning have been planted, is really up to them to explore further. Hopefully, by the next CNY, they will move ahead even further and know which particular field in IT they want to venture into.

#6 Janice Kaplin: "The Gratitude Diaries". Is time to reflect and appreciate on what we have and where we are. How? Keep a gratitude journal.

#7 Today I Learned (TIL) is a famous subreddit. For technology related (programming or system administration), there are TIL collections created by Josh Branchaud, hashrocket, Jake Worth, and thoughtbot.