Showing posts with label hardware. Show all posts
Showing posts with label hardware. Show all posts

Thinkpad X230 - Tweaking Intel Centrino Advanced-N 6205 [Taylor Peak] Slow Wireless Performance

After using that ISP for so many years, the modem that came with the existing packages finally failed. The technician told me that the model of the modem was so old and there was no replacement stock. Instead, we have to substitute it with another modem cum router. Nevertheless, a simple hardware swap and configuration setup and everything back to normal. Typically, the next step was to test the broadband speed from my lappy.

Install the Ookla's speed test CLI tool.
$ sudo apt-get install speedtest-cli

Benchmark the connection speed. Not entirely correct as this depends on the Wifi signals and access protocols. Nevertheless, it will give us a baseline. Result shown below was nothing impressive and seemed wrong and should be higher instead.
$ speedtest | grep -E "Download|Upload"
Download: 21.12 Mbit/s
Upload: 18.83 Mbit/s

Checking through the available network adapter in this lappy.
$ lspci | grep Network
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04)
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 34)

Based on the hardware information we obtained in previous step, we want to find out what Wifi protocol does this wireless adapter supported.
$ lspci -vv -s 03:00.0 | grep 802
 Subsystem: Intel Corporation Centrino Advanced-N 6205 (802.11a/b/g/n)

Following the instruction from this page, update the iwlwifi (Intel Wireless Lan) driver to enable antenna aggregation of the Wifi adapter.
$ echo options iwlwifi 11n_disable=8 bt_coex_active=N | sudo tee -a /etc/modprobe.d/iwlwifi.conf
$ sudo modprobe -r iwlwifi
$ sudo modprobe iwlwifi

However, this does not works for me. Even trying different approaches. Perhaps upgrading the internal Wifi adapter that supports 802.11ac? But that is damn tricky as we need to flash the BIOS to remove the whitelisted Wifi adapter.

MSP430 - Online Resourses

Some relevant online resources for those who want to start exploring microcontrollers, especially the TI MSP430G2 LaunchPad development board. This page will be updated from time to time.

How/Where to start?
Technical Documents
  • SLAC485. Sample MSP4302553 codes.
  • SLAU144J. MSP430x2xx Family User's Guide
Tutorials / Webinars / Workshops
Community Sites
University courses based on MSP430
  • ECE2049: Embedded Computing in Engineering Design.
  • EE3376: Microprocessors.
Using other programming languages
  • Assembly programming with MSP430. Contains a list of of online resources related to assembly programming with MSP430.
  • Mecrisp. Another implementation of Forth for MSP430.
  • noForth. Interactive Forth programming language for MSP430. Do this if you want to learn Forth and hardware control through the Egel project.

This Week I Learned 2018 - Week 35

The previous post or something else from the archive.

How do you increase your monitor resolution if the default resolution was not sufficiently enough? As I was reorganizing my battle station, the old monitor resolution was off due to changes in the display adapter name. These steps have to be done as the display driver will not set to the correct resolution due to old VGA adapter.
$ cvt 1280 1024 60
# 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
Modeline "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
$ xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
$ xrandr --addmode VGA-1 1280x1024_60.00
$ xrandr --output VGA-1 --mode 1280x1024_60.00

While the new UI in Gnome's display settings have been polished and updated. However, it still can't detect or add the correct solution for each display adapter. Is there a way to better manage and automate this process? Yes, this is possible through autorandr and pool-xrandr.

How does USB upstream and downstream ports works in Dell monitors? There are two types of connection. First, the type B connector which connects to your PC to get its power source to your USB hub. Second, the remaining type A ports for you to use for other devices. (See screenshot captured below, credit to Psycogeek). Now where is that USB Type B to Type A cable?

What happened when you start another culture in a remote island? Interesting documentary on Cocos (Keeling) Islands.

This Week I Learned 2018 - Week 28

Last week post or something else from archive.

Why Aloha shirt is still not a common official men wear here? Via HN. We're living in a tropical country and yet our normal office wear is following western style. On the related note, the history of Aloha shirt was an interesting read as well.

Looking to get started in medication but don't want to fork our money? Look into the UCLA's Guided Meditations audio tracks. Download all and make it a playlist.

What the difference between informational support and emotional support? If your SO talked to you about her problems, just shut up and listen. Do not offer any solutions to her problem. Just listen and understand. Discussion at Reddit agreed with that. Don't assume. Ask or request what you want, if possible, explicitly. If you consult a doctor, are you going to tell the doctor that you're sick and he/she should know what sickness you've without you disclosing more specific details?

Stuck at your current tasks or your goals during the weekend? Chop wood, carry water.

Looking for food pyramid in the context of MY? Yes, it seemed we have a guide or alternative summarized version that from Ministry of Health. While we at it, there is another guide for low cholesterol diet as well. Why they don't provide a printable PDF version or compile everything into a booklet instead?

You know what is craziness when comes to set up your home network? Unnecessary and over-engineered enterprise level setup.

Joining the Utrawide Master Race but short on moolah? On first look, the LG 29WK600-W looks like a good choice if you're short of cash. However, it's best to check the actual specifications of the monitor before making any purchase. The panel bit depth is actually 6-bits + RFC and not really 8-bits, hence the 16.7 millions colours is overstatement. While the split screen functionality is nice, it has it's own security issue if you're running Windows. For GNU/Linux, there is Fake Xinerama or gTile (if you're using GNOME) that simulates several virtual monitors.

Setting up a home audio studio? This advice is a good way to start.

Is Anabas testudineus (also known as Puyu in Malay) suitable for consumption? Yes, and it's being massed produced as ornamental fish (gold colour variation) or as food source. I've long knew this fish but never realized that it actually travel through dry land to mate as shown in video below. And the hormone that the breeder used is most likely Ovaprim or GnRH, a spawning agent to induce breeding for fishes in captivity.

Do no feed the female Betta a day before breeding and let mating happened after 6pm because cooler temperature is good for bredding Betta? The issue with online resources when come to fish breeding procedures is it's quite hard to differentiate anecdotal experience or scientific result.

This Week I Learned 2018 - Week 02

Last week post or something recent from the past.

农历新年即将来临,在寻找适当的春联Antithetical couplet)时,偶然读到古代的「烟锁池塘柳」这上联,自古以来,难有适当的下联。但花燃山色用程序来寻找最佳的下联即搞笑又聪明。佩服!佩服!话说回来,历代比较好的对句如下:

  • 烟锁池塘柳,灯镶酒坊楼。
  • 烟锁池塘柳,炮镇海城楼。
  • 烟锁池塘柳,桃燃锦江堤。

After watching the demo on how to build your Javascript project using Webpack and Gulp. I'm seriously wonder what the eff have happened to the web development, especially the front end? While I'm for using latest development tools if possible, but the complexity of building and bundle the JavaScript rubs me the wrong way. Yes I know, once you get used to it and embrace it somehow. Where was the simple way of building web application?

When you're getting a new fish or plant to your tank, you will need to quarantine both. The issue with introducing new fishes or plants is that they may carry disease, fungus, and bacteria. Having a proper quarantine procedures also prevent potential pests (e.g. snails, insects, or worms) from being introduced to your tank. How we going to do that then? A teaspoon of aquarium salt and Methylene blue (a drop per gallon, depends). Vinita Phord have written a good introductory guide on the whole process. Adapt and adjust on your own.

Interesting talk given by a fellow data scientist who was originally a developer. Wish more young fresh graduates could join the talk. On the career side, the presenter gave tips on how to get yourself ready in data science. Three things: build enough competency, have confidence, and know enough to get it through. Always hire for the right reason, not just mere head counts. For young people, the most important criteria for selecting a job is the role is supportive to your career growth. Not just the salary, when you're fresh, pick the right environment to learn and contribute. Unfortunately, the talk was diverted into another old unresolved discussion or dispute of why we don't have enough lady in tech?

Fishackathon. Just realized this week that such even exists. The monitoring device in the 2016 winner team piqued my interest. Does a similar devices on a smaller scale exists in the market for hobbyist? Yes, there is Open Aquarium (based on Arduino) which is, unfortunately, costly and bulky.

Surprised to found that famous illustrator or comic artist, Chen Uen have passed away last year. Parka Blog have a review of his works. While I'm not a fan of his works, I firmly believe that Wuxia comics should definitely drawn in traditional Chinese painting style rather than the typical manga style.

This Week I Learned - 2017 Week 48

The usual last week post or something from the archive.

Down with fever and flu. At certain age, you really need to love your body as much as possible. On the bright side, I'm almost off the grid for the past few days.

The Best Monitor for Programming: A Cheap 40″ 4K TV. (via HN) Not really a good choice if you want to reduce eye strain and myopia. Also, you will need to have a good distance in order to get the actual benefits. However, definitely not for me. A large screen size is suitable for people who love to have multiple opened windows at the same time. I always prefer one window at a time.

The Diderot Effect. We all will experience this someway or another. Picking up a new hobby, for example, photography. Well, not only you're just getting the camera body only, you will purchase the whole system (complementary accessories), which includes bags, lens, filters, books, magazine, and etc. The constant upgrades will lead to endless hoarding. James Clear have recommended a few ways to manage Diderot Effect. The main take away are reduce exposures, prevent impulsive purchases, self-imposed constraints, and downgrade. The last strategy seems interesting. We're seldom downgrading on stuff we owned but constant pursuit for latest greatest.

CS007: Personal Finance For Engineers (via HN) Worth every minute of your time to go through the whole thing. We have been taught and educated on different types of mathematics but not really on finance. This should be the compulsory subject for all students. Start them young and early.

Emulate the SRV tones? Forget the about the budget and get his signature guitar, amps, and pedals. Or without bursting the bank, something more affordable. While having similar gears does getting you closer to emulate original tones, do know that how a guitarist play, hold, pick, and grip guitar have a huge influence on the tone. Furthermore, post processing have a big impact on the final sound and tone. However, something related, PixxyLixxx gave a good advice on why you should have a limit on how much you can spend on a guitar (in his case, is USD 300 with certain exception). Unless you're freaking rich, when you past certain age, different priorities in life set in. You should put the extra money in your kids college funds or fixing your house.

This Week I Learned - 2017 Week 35

Last week post or revisit some old archived posts.

Long holidays and I finally have extra time to clear off some of those pesky and pending to-do list. Learned quite a lot this week, especially from different electronic devices and computer hardware.

Software development 450 words per minute. (via Reddit / HN). Be grateful. That's probably takeaway from the article itself. I was wondering how it going to affect your hearing if you keep listen to the headphone non-stop for more than 8 hours per day?

Good post on introduction to mechanical key switches, specifically Cherry MX family. For a non-gamer but mostly using your keyboard for typing, Cherry MX Brown and Cherry MX Blue would be the preferred keyboard switch for a mechanical keyboard. The Brown switch was originally developed for Kinesis Keyboard. Yes, that company that created the ergonomic contoured keyboard. Meanwhile, the Blue switch, have same tactile feeling and clicking sound to IBM Model M but less activation force. Does mechanical keyboard worth it? Yes, only if you play lots of games, build a Battlestation, a mechanical keyboard enthusiast, or have extra money to burn.

Buying an air purifier? Fview YouTube channel is probably the best I've watched so far. Honest opinions with lots of satirical remarks in between. Just like taking an advice from a trustworthy friend. So which air purifier to buy? From the result and price point, just get Xiaomi Air Purifier even through you have to tolerate the high fan noise. I was surprised that few European brands are so expensive but the filtering output was mediocre. Most likely you're paying premium to the quality material and long term reliability. One thing I've learned from electronic devices made in China or electronic devices in general these days. There are not built for reliability. a throwaway device that only serve a purpose for a short period.

Yeah, the bokeh, colour, and contrast is phenomenal and surely will make you mouth-watering.  Just make sure you watch the YouTube video in highest resolution. The most important criteria is the colour (in JPEG) format shows the actual colour and contrast representative of what we saw with the reviewer eyes. Be warned, both Sony A9 and Voigtlander 50 Heliar V4 will cost you around MYR 21k. Definitely not worth it unless you have extra cash to burn. Even so, still not worth it.

More lesson regarding ConTeXt. Want to use Times New Roman, make sure you've installed the Tex Gyre package where it includes the Termes aka Times New Roman font.

Installation of more PWM casing fans. The motherboard seemed quite sensitive and there are numerous times I can't get to the POST screen. Reading through the POST troubleshooting steps, manage to boot up the machine again. Suspect loosen power wires, memory slot, or bended CPU pins were likely the contributing causes.

Fan speeds seems to be at an accepted range. There is an increase of volume heard but I like the white noise.
$ sensors | grep fan
fan1:         1704 RPM  (min = 1577 RPM, div = 8)
fan2:         1875 RPM  (min =  784 RPM, div = 8)
fan3:         1577 RPM  (min =  685 RPM, div = 8)
fan4:            0 RPM  (min = 3515 RPM, div = 128)  ALARM
fan5:            0 RPM  (min =  703 RPM, div = 128)  ALARM

Hardware UART in MSP430. I have no idea this is possible. Mainly because I have no idea what and how UART works anyway. And, I also found out that there is a UniFlash, which is the Universal Flash Programmer for all Texas Instruments devices. Seems to support MSP430 and GNU/Linux but I haven't try it out yet.

I was looking for a DAC and my research indicated that using Raspberry Pi with HiFiBerry would be a good choice. Maybe that could put my shelved Pi into good use?

Running Docker on Fedora host but have permission error with mounted volume?
$ docker run -it -v /home/ang/project:/export tts:latest bash

[email protected]:/export# ls -l                
ls: cannot open directory '.': Permission denied

To resolve this properly, since this is a SELinux permission issue (reason why you should always test your stuff in Fedora/Red Hat/CentOS distros), you can append extra `z` or `Z` character to the mounted volume option `(-v)` as shown below.

-v /home/ang/project:/export:z

Meanwhile, setting up Docker in Fedora to support non-root user. (Yes, there are many security concerns).
$ sudo groupadd docker && sudo gpasswd -a ${USER} docker && sudo systemctl restart docker
$ newgrp docker

Readjustment of my night computing usage. Turned on Gnome's Night Light. This is to reduce the effect of blue light affecting the body melatonic production.

Asus P7F-M

As I was migrating or build another workstation or battlestation, I opted to build the machine based on Intel Xeon X3430 and LGA 1156 socket instead of trending AMD's Ryzen. Yes, it was an odd choice due to the sentimental feeling I have for old Xeon processor, especially the X series. And it's good to bought used anyway and I don't want to waste my existing ECC RAM. If you're looking to build a system through used parts, the X58 LGA 1366 would be a better choice as it's still quite relevant and supported.

Getting the motherboard is not easy as LGA 1156 socket is a deprecated old architecture. Furthermore, getting one that support ECC RAM and micro-ATX form factor is even more harder. Luckily I managed to found Asus P7F-M and Xeon X3430 CPU through Tao Bao with a reasonable prices. The former costs around MYR 150+ and the later, around MYR 40+.

One key lesson I've learned when build a PC is that you really need to read the damn manual. I've spent several nights for the past week trying to figure out what went wrong when the machine cannot POST (power-on self-test). And the root cause is simply I don't RTFM and wasting time plugging and unplugging each hardware components from the motherboard. More on this later.

Unknown to me, the cheapest heatsink fan I've bought have the 3-pin power source instead of regular 4-pin. Initially I thought it will not work but luckily, the motherboard support switching the CPU fan from default 4-pin to 3-pin. The diagram below illustrated how to switching the CPU fan selection. It has been so long since I last need to change the jumper of a motherboard. Interesting time indeed.

Next, which is the part I struggled to boot up the machine, I didn't realize that desktop and server motherboard behaved differently. A server motherboard will immediately POST up once power supply have been turned. Not so with desktop motherboard, you will need to "jump start" (like pressing the power button if installed to a casing) it manually. Turned out it's quite easy, you will need to take a screw driver and touch both the POWERBTN# and GND pin at the same time. In the diagram below, it's located at the System Panel 20-pin connector, second row, pin number 5 and 6 from the left.

Upon realizing this, I was sitting at my computer and starring mindlessly at the motherboard. I was troubleshooting it for days and it just dawned to me that everything was working fine. I just need to power up the system from the motherboard.

Next, the default onboard VGA controller. Since I've existing graphic card which support multiple monitors, best to disable the VGA controller. The VGA controller was way better than my HP Proliant's VGA controller running Aspeed AST2050 8MB of RAM. Even without installing the external graphic card, the usage was snappy enough in Fedora 26.

Upon completion on setting up the system as well as the Operating System, checking through the temperatures, everything seems to be within acceptable ranges.
$ sensors
Adapter: PCI adapter
temp1:        +60.5°C  (crit = +120.0°C, hyst = +90.0°C)

Adapter: ISA adapter
Core 0:       +47.0°C  (high = +83.0°C, crit = +99.0°C)
Core 1:       +41.0°C  (high = +83.0°C, crit = +99.0°C)
Core 2:       +46.0°C  (high = +83.0°C, crit = +99.0°C)
Core 3:       +44.0°C  (high = +83.0°C, crit = +99.0°C)

Is this motherboard better? Indeed, it felt way faster compare to my old HP Proliant's motherboard. However, there are certain underutilized features, for examples, the RAID and extra dual LAN ports. Furthermore, I believe two memory slots were broken (can't complain much since it's bought used) and I ended up with only 16G of ECC RAM. Suffice to say, should be good enough for my daily usage since my old workstation's motherboard have been partially broken and kept restarting somehow. My hope that this motherboard is good enough to give me maximum three more years of continuous abuse.

Buying a Power Support Unit (PSU)?

The motherboard have arrived today but I don't have a Power Supply Unit (PSU) yet. It seems that I did not pay much attention to the PSU and took things for granted. Luckily I didn't make any unnecessary purchase and decided to wait (limited budget) and research more before making any buying that I will regret later. Three things need to take into consideration when buying a PSU. First, power connector type of your motherboard, the required power needed, and lastly, the power efficiency needed.

First, normal and high-end (like server or workstation) motherboard have different power consumption which determines different connector type. There are different type of connector (differentiate by number of pins) which provides additional power to your CPU. Normal desktop uses 4-pin connector where server or workstation uses 8-pin connector. To quote Wikipedia (emphasis added),
ATX12V 4-pin power connector (also called the P4 power connector). A second connector that goes to the motherboard (in addition to the main 24-pin connector) to supply dedicated power for the processor. For high-end motherboards and processors, more power is required, therefore EPS12V has an 8-pin connector.
The screenshot below (credit to Mark Allen) shows different type of power connector used by the motherboard. The 8 pin EPS connector and 4+4 pin connector (not EPS compliance) are equivalent. Unless you can find 4-pin to 8-pin adapter (not sure this is applicable for server motherboard), best to just find the right PSU which support the number of pin needed. 4+4 pin is your best bet.

Next, determine (or through this site as well) the load wattage needed. Fill in the type of machine and all its components needed, you will have an estimation of power required. Unless you're always upgrading your machine, buy the one nearest to your required load wattage. My calculation of my hardware specification yields around 273W needed.

The next question is how many watts should you get? Remember, you will not fully utilize 500W out of the PSU as there is no way for 100% efficiency usage. Energy will be leaked due to heat. For example, a PSU with maximum power (also known as peak power) output of 500W, continuous voltage power (you may look for wording like 'combine +12V' or 'max combined power') of 450W, and rating of 80% efficiency under certain load. Then, the actual energy drawn continuously from the PSU is 360W. That basically fulfill the energy requirement I've calculated earlier.

Lastly, determine the power efficiency. Unless you're running a server for 24/7, goes for anything PSU with 80 Plus standard, 80 Plus Bronze standard should be good enough. You can choose from different manufacturers. However, rating sometimes can be misleading. PSU is as good as its capacitor used and there are many different tier of capacitor manufactures. Tom's hardware provides a good list of matching PSU manufacturers and capacitor manufacturer. Use that list to make an informed purchase. Another way to determine whether the particular PSU is using a good capacitor is check the warranty period. Longer warranty given indicates better components or capacitor used.

My research leads me to these PSUs due to availability and budget. Since this is not an urgent buy, might as well sleep through it and revisit it from time to time.

In conclusion, follow these following steps.

  1. Determine your form factor. Is it ATX, micro-ATX, or something else?
  2. Estimate your load wattage need based on the component needed.
  3. Calculate the actual wattage needed from your PSU.
  4. Check the PSU manufacturer tier list and see which brand and model use the best capacitor.
  5. Select the PSU with 80 Plus Bronze rating that fit your budget.
  6. Google for any reviews of the selected PSU brand and model.
  7. Buy the PSU.

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.

Unable to Mount USB Thumb Drive in Nautilus - Physical Block Size Mismatch

Before I can proceed to setup my tiny homelab machine, Kabini, I need to burn the installation media to the USB thumb drive. However, when the thumb drive was plugged in, Nautilus can't seem to mount it although the kernel message did indicate device `/dev/sdc` did exists and mounted.

Checking through GParted, the default GUI partition tool in GNU/Linux shown that "The driver descriptor says the physical block size is 2048, but Linux says it is 512 bytes"

As usual, SO gave us the root cause and solution to rectify this block size error issue. It seems that I may accidentally wrote to the USB thumb drive using the wrong parameter through `dd` command. To fix this, we need update the thumb drive's partition to the right block size. Running the command below did resolve the issue for me.
$ sudo dd if=/dev/zero of=/dev/sdc bs=2048 count=32
32+0 records in
32+0 records out
65536 bytes (66 kB, 64 KiB) copied, 0.00655332 s, 10.0 MB/s

Once the corrupted block issue have been resolved, go back to GParted and refresh the thumb drive. GParted will prompt you to create a new partition table.

After we have created the partition table, Nautilus will show a proper mounted thumb drive. See screenshot below.

Download the Ubuntu installation ISO file. I'm downloading both the mini and Ubuntu server 17.04 ISO file. This is the time where torrent really shine where I can achieve the speed of 3.02 MB/s, a feat not doable even using parallel HTTP connection using download manager like Aria2.

Next, burn the ISO using the Startup Disk Creator. Load the ISO file as the source disc image and burn it to your thumb drive.

In the past I always used dd command line utility to burn ISO. Little I realized once you've done burning, you can test the thumb drive.

Verification is done by QEMU, hosted hypervisor. If you can see below installation menu, then the thumb drive have been burned and can boot up correctly.

You can achieve similar result through the command line command below. X is the alphabet of your thumb drive.
$ qemu-system-x86_64 -hda /dev/sdX

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 05

Last week post or whole series.

Always an interesting CNY holidays. The flood was not as worse as it seems. The weather is good and the air, seems cleaner. I've managed to get some good rest and deep sleep (more on this in #4).

#1 Canonical have launch Ubuntu tutorials, a step-by-step guideline for setting up development or devops related activities. I was surprise that they started the tutorial using Intel Joule 570x (their answer to IoT?) as the reference hardware. With a price tag of USD 369, I failed to see how this development kit is going to gain any traction when compare to Raspberry Pi. Maybe the target audience is not the Maker community but the industry?

#2 I've bought TI MSP430 development kit to learn more about embedded programming. So far,, the only thing I learned is microcontroller or MCU is "computer on a chip" or also known as System on a chip (SoC). Compare to the Arduino, Raspberry Pi, or Beageboard, it's way more low-level and cheaper. Once I've done with this, the next SoC that I will get is the ESP32, the successor to ever popular ESP8266. For the time being, the next step is introductory write-up on the hardware, setup the development board, testing the serial communication, go through the tutorials, and follow these four things to do with new microcontrollers.

I've noticed that there is this M430F1612 chip (square shape) on the launchpad. Feature-wise, it's similar to MSP430G2553 (rectangular shape) but was used for debugging purpose via JTAG from our computer.

I was thinking on getting more MSP430G2553 and stumbled upon this site, FindChip, which can search through all the popular electronic parts resellers. Note that the search links does contains affiliate links. But is a good way to find available stock and prices in one place.

#3 Are we over-dramatize our life or why people need drama in their life? Sometimes, no news is good news. If you ever complain about boring and simple life, you've been trying to mold your life according to a fairy tale. Follow your dream is such a clichéd pieces of advice. Too abstract and too vague. Be more specific, for example, stay healthy by exercising for 30 minutes on 5 days a week.

#4 Interesting idea on restricting exposure of lights can affect your sleep patterns. I've been living in the city for many years and my exposure and computing usage (you brain is kept active and Melatonin production is delayed) have somehow affecting my sleep cycle and thus my health. Maybe I should switch to something like Philips Hue Bulb? Need to readjust my time and remember, bedroom is for sleeping. Is okay to have TV in the room, just for the sake of white noise. Maybe because there is a healthier life without Internet. Remember, there is way to get you hook on an app or site. Off course, there is antidote to that as well.

#5 "Short answer, It doesn't. Long answer, It does not." Regardless the context of the discussion, the comment is both humourous and fscking brilliant. There is a similar saying as well. "To make it short, is a long story". Maybe we should invest our time in writing? While we on writing, be careful when you use the pharase "duly noted". It usually means "heard and ignored" in a sarcastic way or if you add an extran 'l', it becomes "dully" noted, which means you "barely" acknolwdge. To prevent unnecessary misunderstanding, replace it with "Got it, thanks!" (informal) or "Noted, and thanks!" (format).

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.

This Week I Learned - 2016 Week 49

Last week post or the whole series.

When a screenshot says a lot. The 14-plus hours uptime is something to be concerned about. Is best to be away from your machine from time to time. As you age, there is no needs to tweak your environment, just use the default settings for almost everything.

Certain unfortunate requirements led me to buy a USB-based high powered 300Mpbs Wifi adapter, TP-Link TL-WN8200ND. Unfortunately, while the driver seems to load properly, I still can't connect through Wifi in Ubuntu 16.10.

Understanding htop. Comprehensive guide to htop and its equivalent console commands. It will make you realize how much htop have aggregate and collect all the necessary information. The same author also wrote another useful guide on HTTP headers.

While we're on HTTP. Encountered this error with Nginx few weeks back where the error log shows that "upstream sent too big header while reading response header from upstream". In other words, your proxy server, Nginx does not like the data sent over from the application server (upstream). Several reasons may cause this like large cookies size, cookies with way old timestamp, or mismatch of response size and content length. Several ways to resolve this, either fix the issue at the upstream , disable proxy buffer, or increase proxy buffer sizes. Example as shown below (do not follow this values, adjust accordingly). Don't understand these settings? You can read details explanation and an excellent guide on these directives.
http {
    proxy_buffers           8 4k;
    proxy_buffer_size         8k;
    proxy_busy_buffers_size   16k;

On Perl. Nothing much pickup for the last two weeks, mostly just test cases and test cases. Interesting behaviour when returning value from subroutine. Being Perl, implicit is better than explicit as compare to Python. For example, there is this rule of do no return `undef`, just use the bareword `return`.
use Dumper;
sub a { return undef; }
sub b { return; }

my @aa = a();
my $a = a();

my @bb = b();
my $b = b();

Dumper(\@aa); # [undef], not false
Dumper($a); # undef, false

Dumper(\@bb); # [], false value because empty array
Dumper($b); # undef, false

How to implement Test-Driven Design (TDD) in Perl? So many good links given in those answers to the questions. Unfortunately, most of the links are quite dated and some may not be that relevant anymore. But since this is Perl, most stuff should be long standardized and stable.

This Week I Learned - 2016 Week 33

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

Travelling. Hence, the delay in weekly post.

The Hiperstation. Probably the cleanest and minimalist workstation station with a touch of retro feels, the VT220 terminal. Maybe I should readjust my battlestation again?

While we're on the discussion on retro hardware, how about reproducing the nostalgia bucklespring keyboard sound of IBM Model-M keyboard.

Introduction to Japanese, via HN. Comprehensive guide the Japanese language and writing system.

This Week I Learned - 2016 Week 31

Looking back to the last week post or you might want to check out the whole series.

Simulate different network condition, especially when testing file uploading and downloading through Google Chrome's DevTools using network throttling. There are two ways to set the settings, see screenshot below. While I'm not a front-end guy, but Chrome DevTools has significant improve the front-end development process. Off course, there is also debugging method on setting breakpoints and detect changes as well as using it as IDE. Lots to learn!

Buying audio and video devices? Nothing beats these written guides by zeos.

Sublime enhanced. Extra set of plugins for Sublime editor.

This Week I Learned - 2016 Week 25

Last week post or the whole series.

Space random generator. (HN post) Interesting result of applying Procedural Generation to generate random 3D spaceship using Blender. The fun thing about procedural generation is that we never know the outcome of the generation and sometimes there are random surprises. Example of the generation is shown below.

I'm in the midst of building a GNU/Linux 3D workstation and based on the Blender's optimum system requirements and supported platforms. Interestingly, the XEON E5-2670 setup, while impressive, seems a bit overboard. Main issues will likely be the graphic card driver support for GNU/Linux.

Similar to Python, indentation in Makefile, if use incorrectly, can't cause  can cause command not found error or sometimes, wrong ifdep usage. While we're on Makefile, recursive Makefile is doable.

Three shirts, four pairs of trousers (via HN). Living with the bare essentials. Somehow, unknown to us, hoading has become a part of us. Sometimes "throwing" away all the unnecessary stuff helps to reset, reboot, and rewind our unhealthy relationship with our physical or digital stuff. Awareness is the key here, otherwise subconsciously we will tends to buy or get more stuff, especially if you have hobbies of collecting stuff, worst if it's an expensive hobbies. Declutter is a long lonely process as you're constantly fighting with yourself whether to keep or to let go of the stuff. First rule, if you're not using anything for a year, get rid of it, regardless your sentiments.

How to Skivvy Roll. The most efficient packing system when travelling.

Another homelab using AMD Athlon 5350 compare to this. Interestingly, the case used here was an 2U rack.

This Week I Learned - 2016 Week 24

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

Typosquatting programming language package managers. Mostly likely inspired by the Npm's left-pad incident.

Print debugging on steroid in PHP? Try Kint.

Due to the decommission of CPU processor by big Internet companies, the used market was flooded with Xeon E5-2670. Hence, there are many who tried to build a powerful Dual-Xeon machine. While the processor is roughly around USD 70 and highly soughtable, the motherboard is very costly. It's reasonable that everyone want to assembly the most powerful machine with minimum cost. However, judging by the TDP, it recommended to build smaller and more economical home lab. Again, it still depends on what the main purpose you want to build your own home lab.

tl;dr: Maintenance code: 3008.

Have an Unifi account with the Huawei EC6108V8 media player? Want to make the most of this tiny device? The essential configuration and setup steps are in post #10, #14, #32 (enable you to login to Play Store), #69, #90, #98, #102, #103, #178 (if #32 doesn't work), #190, #208 (similar to #178), #218 (maintenance code), #252, #263, #278 (similar to #178 and #208), #287, #291, #311, #319, #359, #377 (like #178), #387 (device specification), and #414.

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.