Showing posts with label arduino. Show all posts
Showing posts with label arduino. Show all posts

This Week I Learned - 2017 Week 34

Last week post or the old archive stuff.

Having a working and non-disrupting battle station have finally let me able to concentrate on my personal stuff. There are a lot of things to clean up and de-clutter but one thing at a time. At least I can sync up the productivity at both work and home.

Lots of re-learning of ConTeXt, after so many years away from it. The number one rule in using ConTeXt, you must append a comma (,) in a list of items. Not sure why, but I was burned several times where the intended results were not obtained regardless numerous times of trials and errors.

This will not work.

This will work.

Undo certain Git commit. Two steps involved. First is to reset or remove the particular commit and push the changes to remote origin. Second, pull from the remote origin and reset the index.
$ git reset 7f6d03 --hard
$ git push origin -f

$ git fetch origin
$ git reset 7f6d03 --hard

Finally, found the effective way of managing your dotfiles and the full write-up describes the details on how to set it up, either new or existing Git repository. Good example where the lack of understanding of Git undermines the effective usage of managing your dotfiles. There is no need for external programs to manage your symlink and updates. Just plain old Git. The hassle and complexity of managing your development environment setups (I've tried a few ways) is not worth the time and efforts.

People, this is how you design a login or registration form.

Installed, uninstalled, and reinstalled the Vim package. Somehow the path to Vim binary have been messed up. However, update the Bash's hash table of full path names of executable files seems to solve it.
$ vim
-bash: /usr/local/bin/vim: No such file or directory

$ which -a vim

$ hash -r

Somehow my Vim installation does not support Python plugins. Some googling here and there revealed that I have multiple implementation of Vim installed in the system. The default selected Vim binary does not support Python plugins. The only way is to update the alternative.
$ sudo update-alternatives --config vi
There are 3 choices for the alternative vi (providing /usr/bin/vi).

  Selection    Path               Priority   Status
* 0            /usr/bin/vim.gtk3   50        auto mode
  1            /usr/bin/nvi        20        manual mode
  2            /usr/bin/vim.gtk3   50        manual mode
  3            /usr/bin/vim.nox    40        manual mode

Press  to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/vi (vi) in manual mode

$ sudo update-alternatives --config vim
There are 2 choices for the alternative vim (providing /usr/bin/vim).

  Selection    Path               Priority   Status
  0            /usr/bin/vim.gtk3   50        auto mode
  1            /usr/bin/vim.gtk3   50        manual mode
* 2            /usr/bin/vim.nox    40        manual mode

Press  to keep the current choice[*], or type selection number: 2

People start hating their jobs at age 35? (via HN) The best possible reason is that they become very aware of mortality and realize time move at a relatively faster pace.

How the RPi::WiringPi distribution is tested. You have to be amazed by the effort the author is putting in ensuring the quality of the libraries. Probably one the most meticulous developer I've seen online. The hardware setup is shown in the screenshot.

Don't like any ready-build electronic prototyping platforms? You can try Shrimp parts kits. I love the minimalist approach of gathering different electronic components and build something up. Good alternative to Arduino. The step-by-step guidance, for example, to blink an LED, is a good introduction for any beginner (yours truly) who want to pick up some electronic.

This Week I Learned - 2017 Week 04

Last week post or the whole series.

What is like to reach the end of middle age and heading towards old age? Both good and bad. The good thing is after a perennial quest of what you want out of life, you finally have some ideas on what to pursuit. The bad? Eventually reality will catch up on you. Your body is getting weaker, both physically and mentally. Distractions or rather addiction to distractions to fend off. Resistances to stay focused due to our short attention spans (made worse by increase mobile phone usage). And never ending growing lists of to-do items to check off. Hence, before this coming Chinese New Year, I've decided to do some virtual "house cleaning", remove and clear off all those pending draft blog posts, my digital drives, and others. One of the post is Using ansible-lint with Git's pre-commit. However, nothing much can be written down this week as I've limited Net access.
#1 Why you shouldn't use delay function in embedded project (Arduino). You should use non-blocking function (also known as asynchronous function) or work along the hardware timer. Working with embedded project made me realized that I'm quite ignorant about programming with constraints and limited resources. Well, if you spent most of your web development time with PHP, I doubt anyone needs to worry much about optimization, just delegates to the frameworks.

#2 "Sometimes people fit snugly into a crack in the world that fits their shape, and sometimes no such crack exists." via HN. Very well written comment.

This Week I Learned - 2016 Week 52

Last week post or the whole series.

Week 52, the last week of year 2016. ;-)

It has been a long way since the beginning of the whole TWIL series. I've reached my goal of writing at least 52 posts this year, I managed to hit 58 posts. Now what? Should I continue this TWIL series? Yes, indeed I should. There is no harm but benefits by continue this ritual. Maybe I should try different approaches and more diversify topics in my posting. Yearly reflection post should come later.

This Arduino project to calculate speed or to implement digital speedometer seems interesting and fun. It was quite a surprise but if you understand fundamental mathematics, it all seems easy and approachable.

Using Pandoc with different fonts and rendering engines. Below command will list out all the available fonts in your system.
$ fc-list : family | cut -f1 -d"," | sort

PostgreSQL 9.6 new features with examples (PDF) via Lobsters. All software release notes should accompany by details example on any features being updated or introduced. I have mentioned numerous times that I miss PostgreSQL a lot.

Discussion on C++17. Now I can understand why C++ is still not that suitable for Operating System development but more for application development which needs performance and full memory management.