Windyland serving my blog

How to start up with a project

  1. Take a glimpse at READMEs, HACKINGs, documents and wikis
  2. Grep the bug list, and see if anything interests you.Also you can look for easy diagnostic bugs. Pick one or two, learn how to reproduce a bug, understand it and try to fix it.

If a bug has been assigned and you’re interested, I suggest contacting the assignee. They might be happy to offload the work and assist you with the fix.

  1. Read through header files, test cases and then source files

Thanks to the discussion of cfe-dev

llvm.cc is up

A new site, namely llvm.cc, is up now.

However I cannot affort a authored SSL certificate currently. If you prefer to HTTPS, please add an exception for https://llvm.cc or visit http://ssl.llvm.cc to grab our self-signed CA certificate. Thanks!

Why TDD? A draft

Reasoning:

  • Pro: Why TDD

    • A significant advantage of TDD is that it enables you to take small steps when writing software.
  • Con: Less is More

    • The tests are code. Developers write code. When developers write code they insert about three system-affecting bugs per thousand lines of code.

Different Kinds of tests

References:

Some notes on swift

##Use it * Download Xcode 6 Beta 3 link

Edited: Requirement of a valid iOS/Mac Developer Program is not needed see more

  • Soft link swift program to your PATH

    ln -sf /Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift /usr/local/bin/swift

####Switch to Xcode 6 as default (optional) * You can xcode-select /Applications/Xcode6-Beta.app/Contents/Developer, if you want * and you would use xcrun swift instead of the soft link after that.

##Quicklook * Switf - Apple * Chris Lattner on Swift * Swift vs Scala 2.11 * FlappySwift * Swift – observations from Rust’s original designer * Swift Cheat Sheet

##Deeplook * Inside Swift

##Document * The Swift Programming Language Book online iBook * Using Swift with Cocoa and Objective-C pdf iBook

##Community * Swift Blog * swiftlang.eu * reddit * stackoverflow

Modernize C++ (draft)

Introduction

How to modernize C++ Code is quite interesting topic especially when to deal with a large codebase.

This list below should be short and clean.

Enjoy

Where are we going?

From

  • Ancient C Code, or ANSI C Code
  • C++98 Code, or C99 Code
  • C++11 Code, or C11 Code

Target

  • C++11 Compatible Code
  • C++14 Compatible Code

Let’s head on!

Modernize it

  • Use nullptr instead of NULL, 0.
  • Use range-based for loop
  • Use enum class instead of plain enum.
  • Use anonymous namespace for static functions of global scope
  • Use using instead of typedef
  • Use auto anddecltype
  • Use std::shared_ptr and std::unique_ptr
  • Use STL algorithm, e.g std::rotate
  • Use lambda and std::bind
  • Use static assertions
  • Use const and constexpr keywords
  • Use override keyword to virtual methods
  • Use explicit keyword for constuctors and conversions
  • Use noexcept keyword for move contructors and other cases

Optimize it

  • RAII
  • Move please
  • Focus on algorithms
  • Benefit from concurrency

Look into it

  • move or copy ?
  • default constructors and destructors (C++11 or C++14?)
  • initializer_list
  • universial reference
  • perfect forward
  • future and async of C++11
  • metaprogramming :-p