[Work Notes] Protocol Buffer Examples

There is protobuf and protobuf-c website: http://code.google.com/p/protobuf/ http://code.google.com/p/protobuf-c/ We are implementing remote control from back-end applications using protobuf-c. The protobuf-c has extensions from Google’s protobuf for RPC functionality. The first experiment is using the message directly by packing messages into shared memory between the server and the client. Both sides can get the message without issues. Our target is to use the RPC approach that protobuf-c provides. First, we create a .proto file — here’s an example statusapi.proto: ...

January 30, 2013 · 2 min · 285 words · Fran Kuo

[Work Notes] Heading Toward Ten Years

While organizing earlier blog posts from 2008, I notice how immature I was back then — but looking at the transitions and broader experiences since, it seems I’ve grown, even if just a little. In January 2011, just before hitting my seventh year, I made a major decision: to leave a very familiar work environment. In some ways, it meant stepping out of my comfort zone — essentially resetting myself. What guided the decision was an unexpected opportunity to work at a multinational foreign company. That opportunity matched a few things I’d been thinking about: ...

January 29, 2013 · 3 min · 546 words · Fran Kuo

[Work Notes] ncftp-3.2.1 Cross-Compiling

ncftp is an FTP client. One of our projects needed FTP functionality, so I cross-compiled it for an ARM target. Build Steps Step 1: Generate the Makefile. If you need curses support, add the relevant library — but for our project it’s not needed: ./configure --disable-ccdv --without-curses --without-ncurse Step 2: Edit the Makefile — update CC and STRIP as follows: CROSS_COMPILE=arm-unknown-linux-gnu- CC=${CROSS_COMPILE}gcc STRIP=${CROSS_COMPILE}strip Step 3: Make it! make

March 3, 2008 · 1 min · 68 words · Fran Kuo

[Work Notes] A Good Article on the Surveillance Industry

While searching for information online recently, I stumbled upon a blog discussing articles about the security and surveillance industry. It was quite unique — it’s rare to find blogs specifically covering this niche industry. Through Andy’s articles, I also made a new connection and shared some thoughts. Blog link: http://febon.blogspot.com/ If you’re interested in the security surveillance industry, feel free to drop by and join the discussion.

December 23, 2007 · 1 min · 67 words · Fran Kuo

[Work Notes] Eclipse IDE under Ubuntu

Most of the following content is adapted from online resources, with some corrections based on issues I encountered during setup. Ubuntu’s default Java environment uses GCJ-1.4, which has poorer performance. So the first step is to install the following packages using your preferred package manager (on Ubuntu, go to System → Synaptic Package Manager): sun-java6-jre (required environment for running Java software) sun-java6-jdk (needed only if you are a Java developer) eclipse-jdt (Eclipse’s Java Development Tools package) eclipse-common-nls (Eclipse’s localized language messages — install this for a Chinese interface) galternatives (GUI frontend for update-alternatives, used to change system default preferences) Edit the following file: vim /etc/jvm ...

December 10, 2007 · 2 min · 356 words · Fran Kuo

[Work Notes] Live555 Streaming Server "config.armlinux" Fix

The following lines in red need to be modified; otherwise you’ll get a flood of errors during linking: CROSS_COMPILE= arm-unknown-linux-gnu- COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_STRSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 C = c C_COMPILER = $(CROSS_COMPILE)gcc C_FLAGS = $(COMPILE_OPTS) CPP = cpp CPLUSPLUS_COMPILER = $(CROSS_COMPILE)g++ CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 OBJ = o LINK = $(CROSS_COMPILE)g++ -o LINK_OPTS = -L. CONSOLE_LINK_OPTS = $(LINK_OPTS) LIBRARY_LINK = $(CROSS_COMPILE)ld -o LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic LIB_SUFFIX = a LIBS_FOR_CONSOLE_APPLICATION = LIBS_FOR_GUI_APPLICATION = EXE =

November 21, 2007 · 1 min · 80 words · Fran Kuo

[Work Notes] The Choice Between Knowing and Not Knowing

Recently, in the process of constantly trying new things — combined with ever-changing work assignments — I’ve started running an experiment of sorts: does a person need to fully understand something before they can accomplish the work? From my observation so far, the answer is: you don’t need to fully understand in order to get something done. However, that’s a short-term view. From a long-term perspective, the hidden costs of not knowing can be just as significant — sometimes even worse. ...

November 13, 2007 · 1 min · 200 words · Fran Kuo

[Work Notes] Visual C++ String to const char*

Converting std::string to const char* in Visual C++ Method 1: Convert to C-style string string str1("hello world"); const char *c_str1 = str1.c_str(); Method 2: Convert to array via data() const char *a_str1 = 0; a_str1 = str1.data();

November 5, 2007 · 1 min · 37 words · Fran Kuo

[Work Notes] Adding Development Tool Packages on Ubuntu/Debian

Adding Development Packages on Ubuntu/Debian For general development: apt-get install build-essential For X window development: apt-get install x-window-system-dev For GNOME development: apt-get install gnome-devel For KDE development: apt-get install kde-devel

October 31, 2007 · 1 min · 30 words · Fran Kuo

[Work Notes] Rapid Task Switching and Chaos

Over the past few weeks, work has been changing at an absolutely ridiculous pace. Hence the title — Super Transformation, like those charades-meets-variety-show segments on TV. It’s also fitting for the political sphere right now, where a better title might be Super Deception, playing out like some endless animated Flash series. With elections in the next six months, that title would hold up. And while we’re at it — Chang Ma-Bian, meaning someone who always lies. ...

October 29, 2007 · 2 min · 285 words · Fran Kuo