- Don't add code cruft. Avoid parentheses around conditions in if-statements or with the
return
keyword. Don't add semicolons except where syntactically demanded in statements or to separate statements on the same line. - Don't use ALL_CAPS; use camelCase
- Don't fight type inference. Use enumeration prefixes, self-references, and class names (with constructors) only when necessary or to clarify coding intent.
- Don't use
var
whenlet
is appropriate, especially for properties. The compiler better optimizeslet
statements for items whose values will not change during their lifetime. For example, Apple writes, "It is good practice to create immutable collections in all cases where the collection does not need to change. Doing so enables the Swift compiler to optimize the performance of the collections you create." - Don't use classes when structs will do. Use class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Only a few considerations when making book suggestions: | |
* No fiction; | |
* Any book/topic that you are interested in reading; *AND* | |
* At minimum tangentially related/instructive to the work you do everyday. | |
(Preferably in the "maker" context, for the lack of better term. | |
i.e. Product/design/development/management/startup/marketing/etc.) | |
The goal is to read and learn together, whatever the topic is; get better everyday, collectively. | |
:) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common | |
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev mercurial libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev | |
sudo mkdir /usr/include/lua5.1/include | |
sudo ln -s /usr/include/luajit-2.0 /usr/include/lua5.1/include | |
cd ~ | |
hg clone https://code.google.com/p/vim/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write com.bohemiancoding.sketch3 ApplePersistence -bool no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ================ Vundle Config ====================== | |
set nocompatible | |
filetype off | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'altercation/vim-colors-solarized' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2012-12-27 12:27:35.942 DayTwentyFour[20082:c07] initWithCoder | |
2012-12-27 12:27:35.947 DayTwentyFour[20082:c07] loadView | |
2012-12-27 12:27:35.949 DayTwentyFour[20082:c07] viewDidLoad | |
2012-12-27 12:27:35.949 DayTwentyFour[20082:c07] viewWillAppear | |
2012-12-27 12:27:35.952 DayTwentyFour[20082:c07] viewWillLayoutSubviews | |
2012-12-27 12:27:35.952 DayTwentyFour[20082:c07] viewDidLayoutSubviews | |
2012-12-27 12:27:35.956 DayTwentyFour[20082:c07] viewDidAppear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface UIView (StringTagAdditions) | |
@property (nonatomic, copy) NSString *stringTag; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.code {background-color:#f8f8f8;} | |
/*Manually copied & pasted from http://docs.readthedocs.org/en/latest/*/ | |
.code .hll{background-color:#ffc;margin:0 -12px;padding:0 12px;display:block} | |
.code .c{color:#998;font-style:italic} | |
.code .err{color:#a61717;background-color:#e3d2d2} | |
.code .k{font-weight:bold} | |
.code .o{font-weight:bold} | |
.code .cm{color:#998;font-style:italic} | |
.code .cp{color:#999;font-weight:bold} | |
.code .c1{color:#998;font-style:italic} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +thomaswhyyou is my openname (Bitcoin username). https://onename.com/thomaswhyyou |