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
Inspired by GitHub plugins like ZenHub and OctoTree, I thought of the following ideas to make the GitHub ecosystem better: | |
1. Karma Points: | |
Problem: | |
Some people create a lot of GitHub projects with very little code of their own and most of it being boilerplate. Their commit history also shows only insignificant changes. | |
There is a need for a proper points system in GitHub that reflects your true skill. More like StackOverflow points. | |
Possible solution: |
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
Ran this to find out number of files and lines of code, in the project: | |
git diff --stat `git hash-object -t tree /dev/null` | tail -1 | |
The output as of 10-03-2014 12:15 IST was: | |
1420 files changed, 106561 insertions(+) | |
$ find . -name "*.java" | wc -l | |
src/org/wordpress contains 311 .java files | |
src/org/xmlrpc contains 13 .java files |
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
package org.wordpress.android; | |
import android.annotation.SuppressLint; | |
import android.annotation.TargetApi; | |
import android.app.Activity; | |
import android.app.Application; | |
import android.content.ComponentCallbacks2; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.SharedPreferences; |
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
... | |
@Override | |
public void onCreate() { | |
... | |
// Volley networking setup | |
requestQueue = Volley.newRequestQueue(this, getHttpClientStack()); | |
imageLoader = new ImageLoader(requestQueue, getBitmapCache()); |
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
... | |
private void initWpDb() { | |
if (!createAndVerifyWpDb()) { | |
AppLog.e(T.DB, "Invalid database, sign out user and delete database"); | |
SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(this).edit(); | |
currentBlog = null; | |
editor.remove(WordPress.WPCOM_USERNAME_PREFERENCE); | |
editor.remove(WordPress.WPCOM_PASSWORD_PREFERENCE); | |
editor.remove(WordPress.ACCESS_TOKEN_PREFERENCE); |
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
... | |
@Override | |
public void onCreate() { | |
versionName = getVersionName(); | |
initWpDb(); | |
wpStatsDB = new WordPressStatsDB(this); | |
mContext = this; | |
// Volley networking setup |
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
... | |
private String getVersionName() { | |
PackageManager pm = getPackageManager(); | |
try { | |
PackageInfo pi = pm.getPackageInfo(getPackageName(), 0); | |
return pi.versionName == null ? "" : pi.versionName; | |
} catch (NameNotFoundException e) { | |
return ""; | |
} |
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
... | |
<application | |
android:name="WordPress" | |
android:allowBackup="false" | |
android:hardwareAccelerated="true" | |
android:icon="@drawable/app_icon" | |
android:label="@string/app_name" | |
android:theme="@style/WordPress" > | |
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
public class WordPress extends Application { | |
... | |
public void onCreate() { | |
versionName = getVersionName(); | |
initWpDb(); | |
... |
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
<application | |
android:name="WordPress" | |
android:allowBackup="false" | |
android:hardwareAccelerated="true" | |
android:icon="@drawable/app_icon" | |
android:label="@string/app_name" | |
android:theme="@style/WordPress" > | |
... | |
<activity |
NewerOlder