Best ever programmer text editor: Emacs
I was using jEdit. And once willing to change to, so called modern text editor, Atom Text Editor. Then I did some comparisons among the text editors. At the end, now my primary text editor for coding is Emacs.
Emacs requires some time to learn and practise. But at the end, I love it too much. It is so powerful, no other text editor to compare with it. But the primary usage is for coding.
Data structure and algorithm
As a computer science lecturer (though I am from cognitive science background, and even labelled as NOT from computer science, 士可杀,不可辱!), I focus on the fundamental knowledge and experience. I focus on C/C++ language on my students, because only have good fundamental knowledge and skills, then they can survive with the evolving technology once they graduated. For example, Flash was popular technology, yet now it is dying. Those who know Flash only, have to learn new technology. Without fundamental skill, how to cope with the new technologies that emerge everyday? Know the root, then you can get any leaf.
Xfce4, LXDE, and Openbox
What I need is performance, eye candy is optional.
My primary desktop environment is Xfce, as it is more lightweight than GNOME, KDE, or Cinnamon (Mate is out of my choice), yet it has more goodies (plugins) than LXDE. But due to my 4-year-old laptop, I found that LXDE has better performance than Xfce significantly. I can run multiple heavy applications at the same time, especially Firefox and Chromium. Xfce performance drops when I run both applications simultaneously. Switching between applications is slower. If running with Skype at the same time, and doing some development testing, the performance drops drastically.
Tab vs space
I was using tab for indentation in coding, instead of spaces. Because I feel that one byte of tab is better than four bytes of space. It produces smaller file size.
However, the problems become prominent in the following circumstances.
- Viewing different languages may require different indentation width. XML and HTML may use 2 characters width, other languages may use 4 characters width. Changing the tab width from the setting frequently is inconvenient.
- Editing source code with different developers and using different text editors will produce source code with both tab and space indentation. As a result, the indentation becomes inconsistent.
- Emacs problem. If the Emacs tab width is set to 8 characters, but the source code indentation is 4, this produces both tab and space indentation at the same line, for example, 3 indents (12 characters width) produce 1 tab with 4 spaces. Oh dear, I always show the whitespace and tab marks in the editor. The ugliness disturbs me.
- Git diff view. If using Git GUI, it will highlight the tab indentation when the pervious line is a space indentation.
So, in the cases above, space indentation becomes handy. Though different developers use different text editor may produce different width of space indentation, with space indentation will produce better output than tab indentation.
Ubuntu with BCM43228
My campus lab has the Dell desktops. I am not sure the model, but the network devices are Broadcom BCM43228. As a result, after installation of the Ubuntu (they were not installed by me), Ubuntu cannot get WiFi connection to online.
Since my student mentioned that Windows can use the ethernet cable to share the wireless network, I asked him to help to share the wireless network from Windows on the other Dell desktop, and connect to the target Dell desktop.
Statistics and functional programming languages
Recently, I feel fervent to learn functional programming, because i) (in my opinion), it will become a trend, and ii) the interpreter can be used as an advanced calculator.
Since I am teaching Statistics, I want to do some calculation of the normal distribution probability.
Before I begin, I need to mention, in order to calculate the normal distribution probability something like P(x < X), this can be done by using a spreadsheet software with NORMDIST() and NORM.INV() for the inverse of the former function.
Xfce4 Power Manager, NVIDIA, Nouveau backlight issue
Recently I move back to use my (around) 4 years old laptop, HP Pavilion dv3. It has NVIDIA graphic card. But since I (re-)installed Arch Linux 64 bit on it, I failed to run the X11 with the proprietary NVIDIA driver. As a result, I used the Nouveau module instead. Then, I tried several times and finally successfully run the X11 with NVIDIA driver.
To use the Nouveau module, in the mkinitcpio.conf, we have to add in “nouveau” module, then build the initramfs (refer to wiki page). And use the “Xorg -configure” to generate the xorg.conf.
MIUI upgrade
Today I just upgraded the MIUI to version 7. Actually, it prompted for the upgrade since some times last week. But I failed to upgrade, expected to be server problem.
So, today I determined to find the solution for manual upgrade. The upgrade version is MIUI 7.0.5.0. I visited the official site and searched the ROM, but the official site does not have this ROM. As a result, just did a search, and found the target ROM in the MIUI official forum. Then everything becomes easy now.
JavaScript
Previously I read an article regarding JavaScript and another one regarding HTML.
JavaScript, it is so wonderful that not only enhances the HTML interaction, (e.g. jQuery), it also makes a revolution of the system architecture design (e.g. AngularJS, ReactJS with Babel). The Babel JavaScript compiler is so amazing that it can transform the JavaScript to EcmaScript 6 with JSX feature. JSX is actually cannot be interpreted by our current web browser, but with the Babel, it makes JSX possible.
Facebook chat list
I am not a Facebook fervent user. I use it because of some of my friends are using it.
So, if you want to enable your “available to chat” status to your group of close friends or special group of friends,
- Go to Friends an create a list that you want to chat with.
- After creating the list, add your close friends.
- Now, turn on the Chat.
- Go to Chat Options > Advanced Settings
- Choose “Turn off chat for all friends except…”, and add in your target chat.
[caption id=“attachment_1168” align=“aligncenter” width=“300”]
Custom chat list in Facebook[/caption]
