Recently my colleague and I were working to port V8 JS engine as one of our benchmarks. We used it as it’s a widely-used library on devices we cared about, and we believed it’s a well-maintained, high code quality project. Or at least we thought.
Reading Summary 2016-02
Programming
A critique of “How to C in 2016” by Matt
A good review as well as critique to the original “How to C in 2016”, debunking some myths, and making suggestions on how to really code in C.
Miscellany
List of Common Misconceptions from Wikipedia.
Best of 2015: The Social-Network Illusion That Tricks Your Mind
Reading Summary 2015-12
Frontend
How to set up a Web development environment with React, Babel, Webpack, and JavaScript ES6 - Philip Guo
Minimal fuss setup for getting started with React and JavaScript ES6
The minimal fuss setup for frontend development, from Philip, one of my favorite professor, programmer and bloggers.
Here Comes Everybody - Book Review
Just finished Clay Shirky’s Here Comes Everybody, which I think it’s a very interesting book. The author shared his insights on how the Internet effectively gathers the power of people, and how it is rapidly reshaping the society today. Book starts with a story on how Internet helps a lady to regain her lost cellphone with the assistance and pressure from people online, and expands discussion to what why it could happen, and what we should do about it. The world is smaller and people are closer than ever before, for better or worse, because of technologies. In this book, the author carefully analyzed ways Internet could affect our lives, what it means to the world.
I listed several observations the authors provided in this book, which I find very interesting.
Reading Summary 2015-11
Compilers
Directed graph traversal, orderings and applications to data-flow analysis
On the graph traversal and their efficiency.
- Pre-order depth-first-search
- Reverse post-order depth-first-search
This could be a very helpful reference when designing data-flow analysis on programs.
Programming
Semantic Version
How to use version numbers in a sensible way: the MAJOR.MINOR.PATCH format. And I quote:
- MAJOR version when you make incompatible API changes.
- MINOR version when you add functionality in a backwards-compatible manner.
- PATCH version when you make backwards-compatible bug fixes.
Internet
I’m a Privacy Advocate, but I Still Use Windows 10 and Google Now
Your personal data is the fuel to power the Internet today, and how should we face it.
Reading Summary in 2015/10
Compilers
Troubles with GCC signed integer overflow optimization
BUG 30475 - assert(int+100>int) optimized away
An interesting ‘bug’ in some versions of GCC (and Clang as well) implementation. Since it’s ‘undefined’ behavior after all, compiler is not obliged to implement it as a defined behavior. Use -fwrapv flag in GCC to inform the compiler that integer value wraps.
Python
Profiling Python in Production
Signal timeout for every small amount of time (say, 1ms in this case) and record the current stack, and we can infer time spent in each function precisely enough. A smart way of profiling large Python programs.
Note: python signal callback passes signal type and signal handler, and signal handler takes signal number and current stack frame.
Hitchhiker’s Guide to Python
Great book to Python, covering code style, best practices and scenario guide. Just started reading it.
A Small Discovery In C Linker
C language is an old-school programming language, learned by almost all professional programmers. Still, it never failed to surprise me each time I dig in a little deeper, as it’s full of small details, some hardly noticed, such as this one I recently discovered by accident.
BitHacks
I’ve recently come across a very interesting article on BitHacks – the low level magics for bit level operations. Some of the tricks introduced here are really excellently clever, some of them may even make you exclaim for their genius!
I had a lot of fun reading through some of the BitHacks. It’s also worth noticing these BitHacks are not only for intellectual pleasures, they provide actual boosts to algorithm performance as well. When an operations is used often enough, the overall performance benefits to the whole program might be significant.
I couldn’t help but keep wondering how on earth did these clever CS guys ever come up with such algorithms. I tried very hard to find some answers and the following are some patterns I noticed in this attempt. Still, honestly, I highly doubt if I can come up with same solutions myself if I ever run into these problems again. Some of them are just to clever.
Algorithm I Summary
Finally! Just finished all the lecture videos of “Algorithm I” from Coursera, and I believe now it’s a good time to review and summarize.
Paper Reading - Fundamental Concepts In Programming Languages
This is a holiday reading summary. I recently came across two interesting blogs on fundamental concepts in computer science, both with the title “10 Papers Every Programmer Should Read (At Least Twice)”. One could be found in here, and another one in Fogus’ blog. Topics of these papers range from Programming Language theories, functional programming, to Lamport’s distributed system theories. I will read and summarize some of them in my blog. It’ll be 20 papers, and 40 paper-readings to do if I do read each one twice. So, it might be a long time before all is finished.