As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label code. Show all posts

GitHub has just pushed out the latest feature: Contributions. I took a screenshot of my profile page:

I love this new feature. You can clearly see what you have done towards others repositories and the amount at when you do. That calendar is definitely the spotlight of the entire feature. Longest streak is probably the most interesting number among the statistics to me. Only 8 days streak coding, I must code harder!

Coincidentally, I was thinking something Id call Contribution Ratio. Its basically calculating commits to others repositoriesdirect commit or via pull requests are all countedover total commits, then you have a percentage, the higher means you contribute more. Although, it doesnt really indicate you have no contributions even when its 0%, you may be maintaining a popular open source project under your account name.

Off-topic: as you can see I know use GetSatisfaction to handle feedback, previously Google Moderator. If you have any suggestions, please add it there.

I want to see such number because I feel I havent contributed any recently, and would like to know how low my number is. However, I didnt start it, because itd be just a number, even that wouldnt take long to code it. If you want to see such number, add your vote on that idea.

Yes, I know it's still 2012. When the clock tells me it's 2013, I will be too lazy to summarize it. Besides, Doomsdays is coming, we probably wouldn't have seen the new year. Yeap, I know. Again. Only silly people will believe Doomsdays is true, right? How could they not see the real threat is Juno?

Moving the range one month ahead, so when it's said 2012 in this post, it means from December, 2011 to November, 2012. First, starts with the summary in case you just want to read the numbers.

Summary

  • Blog: 331 posts and 85 comments.
  • Code: 17,591 additions and 17,874 deletions.
  • Gentoo: 1,056 merges and 999 un-merges.
  • Emails: 750 mails.
  • Last.fm: 4,711 scrobbles ~ 9.8 days (if each track is 3 minute long).
  • Television: 1,240 episodes ~ 52 days.
  • Film: 29 films ~ 2 days.
  • mt: 265.
  • gad: 35.47 (yjlv) + 76.18 (brps) = 111.65.

Blog

Basics numbers

331 Posts       378.730 per year   31.561 per month
 85 Comments     97.257 per year    8.105 per months  0.257 per post

First post                     <-  0.9 years ->                      Last post
One-liner text using jQuery... <-  10 months -> Stack Overflow testing revi...
2012-01-16 11:53:00-08:00      <-   319 days ->      2012-11-30 14:34:00-08:00

331 Posts    210 Updated (after 11 days, 3:10:58.704524 in average)

106,338 Words     321.263 per post
541,550 Chars   1,636.103 per post
  1,574 Labels      4.755 per post

With addition 10 spam comments. Most used word is, well, the "I," 3,170 times. I really need to quit that, heck, it's I++.

Only 321 words per post, it's not very long. I wish my posts will reach 1,000 words in average in the future, though I won't keep that in mind when writing. Blogging shouldn't be like that, it should go with the flow of mood, not the word count.

Most commented posts

   25 ( 29.4%): Full referrer URL in Google Analytics reports
    9 ( 10.6%): Sigh, glad I still have Disqus on my side
    5 (  5.9%): Bored? Have some random eats with recipes on ActiveState Code
    5 (  5.9%): Let your readers decide when to load Disqus
    4 (  4.7%): The Reading list in Blogger Dashboard
    3 (  3.5%): GitHub following and watching graph
    3 (  3.5%): Silly retard filename for removal
    3 (  3.5%): Three years with Gentoo
    3 (  3.5%): Custom date time format in Google Docs Spreadsheets
    2 (  2.4%): Fus Ro Dah!
I can't even remember 7 of them which were written in 2012. It's not like I forgot the content, just too many posts that I couldn't recall when I wrote them.

Distribution of posting and comments

. By Year and Month ..........................................................

YYYY-MM  Posts                             |                          Comments
2012-01  16                           #####|                                 0
2012-02  42                   #############|##                               2
2012-03  94 ###############################|#####                            5
2012-04  89   #############################|############################### 27
2012-05  32                      ##########|##                               2
2012-06  24                         #######|####                             4
2012-07  10                             ###|##########################      23
2012-08   0                                |                                 0
2012-09   0                                |#########                        8
2012-10   0                                |#####                            5
2012-11  24                         #######|##########                       9

. By Day of Month ............................................................

Day  Posts                               |                            Comments
 01   9                ##################|####                               1
 02  16 #################################|                                   0
 03  11            ######################|########################           5
 04   6                      ############|########################           5
 05   9                ##################|####                               1
 06  16 #################################|##############                     3
 07  12          ########################|################################## 7
 08  10              ####################|###################                4
 09  12          ########################|################################## 7
 10  10              ####################|################################## 7
 11  12          ########################|#############################      6
 12   5                        ##########|########################           5
 13  15    ##############################|###################                4
 14   8                  ################|                                   0
 15   9                ##################|####                               1
 16  14      ############################|                                   0
 17   6                      ############|#########                          2
 18  12          ########################|##############                     3
 19  11            ######################|#########                          2
 20   8                  ################|#########                          2
 21   9                ##################|#########                          2
 22  15    ##############################|                                   0
 23  14      ############################|########################           5
 24  10              ####################|####                               1
 25  16 #################################|                                   0
 26  10              ####################|#########                          2
 27  12          ########################|####                               1
 28  15    ##############################|##############                     3
 29   5                        ##########|#########                          2
 30   7                    ##############|##############                     3
 31   7                    ##############|####                               1

. By Hour of Day .............................................................

Hour Posts                               |                            Comments
 01   9                ##################|####                               1
 02  16 #################################|                                   0
 03  11            ######################|########################           5
 04   6                      ############|########################           5
 05   9                ##################|####                               1
 06  16 #################################|##############                     3
 07  12          ########################|################################## 7
 08  10              ####################|###################                4
 09  12          ########################|################################## 7
 10  10              ####################|################################## 7
 11  12          ########################|#############################      6
 12   5                        ##########|########################           5
 13  15    ##############################|###################                4
 14   8                  ################|                                   0
 15   9                ##################|####                               1
 16  14      ############################|                                   0
 17   6                      ############|#########                          2
 18  12          ########################|##############                     3
 19  11            ######################|#########                          2
 20   8                  ################|#########                          2
 21   9                ##################|#########                          2
 22  15    ##############################|                                   0
 23  14      ############################|########################           5
 24  10              ####################|####                               1

Labels

29 (  1.8%): Bash
28 (  1.8%): Python
26 (  1.7%): thought
22 (  1.4%): JavaScript
22 (  1.4%): Blogger
17 (  1.1%): shell scripting
13 (  0.8%): Gentoo
12 (  0.8%): Song of the Day
12 (  0.8%): Google
10 (  0.6%): email

Numbers from Google Analytics


Compare to 2011, the numbers are doubled, even four months have no new posts. In Blogger Stats, the pageviews are 172,645, that's 42.7% more than 120,945 in Google Analytics.

Top posts haven't changed much, three posts written in 2012 got into the list.


As for traffic sources, more people from search engine, which is not what I wanted at all.

Television shows and films

In 2012, I watched 1,240 episodes of television shows and 29 films. Just for rough average number 1,240 * 1h + 29 * 2h = 1,240 hours + 58 hours ~= 54 days.

Holy cow, 54 days! I spent two months on watching television shows and films in 2012.

I wish I was wrong but I took very detail records. After I watch an episode, I use VimNotes to take a record with timestamp. One episode per line, so grep and wc can get the correct numbers. I have been keeping record since October, 2010.

If I was able to count my time spent on YouTube, that would definitely contribute a lot.

Code


17,591 additions and 17,874 deletions. Only count towards some of my own repositories.

I have a project called jquery-jknav, which was not hosted on GitHub until two months ago. I also set up a Google Alerts for monitoring and I just got another notification, I want to see if anyone makes good use of it.

But every a few months, I will see people post exactly source code of jknav, here is a screenshot of well-used keyword:


The most bizarre thing which I can't understand is not why people duplicate the code, but why they duplicate the very old version, which is 0.1.0.2. The latest version is 0.5.0.1.

The strange thing is they all duplicated the same old version. To be honest, I will have to dig for a while to find that version from the old Hg repo on Google Code. I didn't tag versions when did a release at that time.

I can only guess there must be a website provides the code of that version and people don't even bother to check up for updates. The release date is noted in source as you can see in the screenshot above. Almost two years, it is very old.

It's funny, when you search for "jknav," the project website will be listed at fourth place and first two are my blog posts about jknav which I have updated the links.

As for duplicating, I don't understand the need of putting the exactly the same code on Pastebin if there is no modification involved. Isn't a link to where you read it a better option?

int
main (int argc, char **argv)
{
  // the fuck
  char fuck[] = "Well, fuck everybody. Amen.";
  // the hell
  typedef char* hell;

  // fuck as hell
  puts((hell) fuck);

  // fuck to the end
  return fuck[sizeof fuck];
}
Not sure what has gotten me. But fuck as hell.