Skip to content

Instantly share code, notes, and snippets.

View yogurtearl's full-sized avatar

Michael Bailey yogurtearl

View GitHub Profile
@yogurtearl
yogurtearl / gist:894050af6fbbdf3c6b0e
Last active August 29, 2015 14:02
Readable method invocation
// Good idea or Bad idea?
// Lets say you have to call some API with lots of parameters that you don't control
// Like this http://developer.android.com/reference/android/text/StaticLayout.html#StaticLayout(java.lang.CharSequence, int, int, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, boolean, android.text.TextUtils.TruncateAt, int)
// Do you prefer Option #1 or Option #2? Is Option #2 a terrible idea?
// I suppose Option #3 could be to wrap it in a Builder
class Foo {
@yogurtearl
yogurtearl / None.xml
Created December 8, 2013 22:37
Empty Inpection Profile for IntelliJ
<component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="false">
<option name="myName" value="None" />
<option name="myLocal" value="false" />
<inspection_tool class="AccessStaticViaInstance" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidDomInspection" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AndroidElementNotAllowed" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidLintAdapterViewChildren" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidLintAllowBackup" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidLintAlwaysShowAction" enabled="false" level="WARNING" enabled_by_default="false" />