Categories
Fun

Two jokes

Reading Time: < 1 minute

From CocoaChina.

一、
一个人坐在热气球上飞行,突然发现自己迷路了。他降低高度,发现下面有个人。他把气球降的更低,大声向下面的人问路,“请问,你能告诉我我在哪吗?”

下面的人说:“当然,你在一个热气球上,距离地面30英尺高。”

“你一定是个搞技术的,”热气球里的人说。

“没错”这人回答道。“你怎么知道的?”

“很简单,”热气球里的人说,“所有你告诉我的东西在技术上都是正确的,但对我一点用处也没有。”

下面的人回复说,“你一定是个项目经理。”

“没错,”热气球里的人说,“你怎么知道的?”

“很简单”,下面的人说,“你经常找不到北,或者不知道该去哪,你希望别人能够帮助你。在遇到我之前你也是这样,但现在是我犯了个错误。”

二、
从前,有一牧羊人,他在一条荒废的公路边照看他的羊群。突然,路上一辆崭新的保时捷嘎然来了一个急刹车。车主,一个穿着阿曼尼的西装,Cerutti的鞋子,带着Ray-Ban太阳镜,TAG-Heuer腕表,系着一条范思哲领带的年轻人走了出来,问牧羊人:“如果我能告诉你这里一共有多少只羊,你能给我一只吗?”

牧羊人看看这个年轻人,然后又看看他那成群的在牧场上吃草的羊,说:“行。”

年轻人停好他的车,用笔记本连上无线网络,接入美国宇航局的服务,用GPS扫描地面,然后进入数据库,导出60张填满了算法数据和校验数据表的Excel,然后用他的高科技的微型打印机打印出一份150页的报告。他转过头来对牧羊人说:“你不多不少一共有1586只羊。”

牧羊人非常高兴,说,“非常正确,你可以拿走一只羊。”

年轻人选了一只,放进保时捷的后备箱。牧羊人看着他,问:“如果我能猜出你的职业,你能把后备箱里的那只动物还给我吗?”

年轻人回答:“当然,为什么不呢?”

牧羊人:“你是一个IT顾问。”

年轻人:“你怎么知道的?”

牧羊人:“非常简单。首先,你不请自来。第二,你让我花钱来换取我已经知道的事情,三,你根本不知道我是干什么的…现在你能把那只狗还给我了吗?”

Categories
iOS

The modified GMGridViewDemo

Reading Time: < 1 minute

I added the 3rd tab has the excel like data table, the screen shot shown below. I can provide the source code if needed. Just email me at minjie dot xu AT gmail dot com

spreadsheet on iPad

Categories
iOS

Announcing iDataGrid ~ a place dedicated to data grid table on iOS

Reading Time: < 1 minute

A little over a year ago, I started working full time as iOS developer for a mining company. One of the first projects is create spreadsheet like application on iPad. At that time there is no UICollectionView, and I found GMGridView to be interesting. I did look at an existing product called iOS Data Grid Table but there are two limitations which prevents me from using it: 1) It displays the values only (read only); 2) Perhaps more important, at that time I don’t recall it includes source code. So I ends up creating my own spreadsheet like tables based on GMGridView. I also read the nice work done by Tom Thompson. Of course that time my knowledge on UITextField (and UITableView for that matter) is not very good, and I did not understand all good work he did. I did used the UIPicker in my project, as it helps the user input data in many cases (simplify/ease input, reduce validation), I believe I borrow some idea from RayWenderlich’s tutorial too (UIPopupController and UIPicker).

A year and half later, when I took another look at this thing, I found at least four new things which are interesting, the shinobi controls (commerical), the MDSpeadView (looks like read only, github, open source), nucliOS (by Infragistics, commercial) and UICollectionView (Apple iOS native, tutorial by RayWenderlich.com)

Categories
Uncategorized

Hello world!

Reading Time: < 1 minute

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Categories
iPhone app

iOS training classes in St. Louis area

Reading Time: < 1 minute

Disclaimer: not including any commercial providers here, as they are usually more expensive. With today’s online learning resources (raywenderlich.com tutorial, stackoverflow to say a few), it’s fairly straightforward for an experienced developer to pick up Objective C and UIKit, etc. I think the value of classes is mostly from interaction with instructors, and do some real life projects.

wustl

slu

umsl

St. Charles Community College

Last but not least, the St. Louis iOS group led by Brian Coyner. The format is different from the training class, but it’s a good place to hang out with fellow iOS developers in the area. For that matter, there is a mobile dev group with an emphasis on Android (led by Heath Borders) as well.

Categories
iPhone app

iOS 7 articles

Reading Time: < 1 minute

http://mattgemmell.com/2013/06/12/ios-7/

http://blog.mengto.com/ios-7-transition-flat/

http://designmodo.com/flat-design-principles/

http://www.marco.org/2013/06/27/ios7-as-defense

http://whoo.ps/2013/05/12/flat-design-is-great-for-mediocre-designers-like-me

Categories
iPhone app

5 ways to do the callbacks in objective C and iOS dev

Reading Time: < 1 minute

1. Selector
http://stackoverflow.com/questions/3482344/what-actually-is-a-selector

An example
http://stackoverflow.com/questions/10758926/add-selector-to-uibutton
[button addTarget:yourObject action:@selector(yourMethod:) forControlEvents:UIControlEventTouchUpInside];

2. NSNotifications
In a way (and in syntax too) it’s similar to Selector, but used in different settings.

example here
http://www.cocoanetics.com/2009/08/love-to-be-notified/

3. Delegate methods
e.g., UIAlert view, UITextField delegate

customized method (example)
http://www.raywenderlich.com/29474/ipad-for-iphone-developers-101-in-ios-6-custom-input-view-tutorial

4. Blocks
https://developer.apple.com/library/mac/#featuredarticles/BuildingWithBlocks/_index.html

example
http://stackoverflow.com/questions/7180552/implementing-a-method-taking-a-block-to-use-as-callback

5. GCD
My favorite example here.
http://www.fieryrobot.com/blog/2010/07/10/a-watchdog-timer-in-gcd/

Combinations of some of the above, e.g, blocks (GCD) with notification

Categories
advice and tips Fun

Travel in Shanghai

Reading Time: 2 minutes

I visited China with my family a few weeks ago. Shanghai is the flight stop where we arrive and depart.

We stayed at the Courtyard Xujiahui, and Four Points by Sheraton at Pudong during our short stay in Shanghai, a few weeks ago. As I have family and esp. little kid nowadays, I prefer western brand hotel (4 stars) so that it has a bit nice and consistent environment. I no longer go to Home Inn or Jinjiang Star. That was when I was single, and just need a clean place to shower and sleep.

Getting around
In general Shanghai taxi is very nice, with a few exceptions. For instance, we waited one hour in Shanghai Hongqiao railway station on rainy Friday evening (it was also the first day of Gao Kao, China’s college entrance exam). It’s probably better idea if one travel light (without big luggages). Another instance was we were at People’s square, about 10 pm, basically no taxi will take us to Xujiahui. There were a few illegal taxies pass by and asked us if we want to take it. Finally we decided to take Metro (subway) to get back.

Tour bus
We took the double deck tour bus at People’s square, my first time taking it, and was surprised to see a lot of changes in Shanghai, for example, I have not seen Lao Xi Meng for many years (probably not seen it since 1995, 18 years). Big big change. I would like to show my brother the picture some time as I thought he probably have not seen it for 18 years either. Tour bus No. 1 is a good idea for short stay visitors because one can use it for 24 hours, and see many interesting places (bus stops at those places) along the way.

Categories
advice and tips Fun

Went to tower grove farmers market yesterday

Reading Time: < 1 minute

It was the first time I brought my wife and my daughter there. The weather was a bit hot, as I went there after 9:30 am. We bought the typical things: ribs and eggs from Bobbi (live spring farm), tomato, beans and cucumber from amish farmer. Serenity enjoyed her bagel and apple at the picnic by the market, it’s just some food we brought in case she wanted to eat.

I’m hoping to bring them more often to the market on Saturday mornings this Summer.

Btw, I was thinking about adding a “news feed” to the ToMarket app I recently created. It’s also funny Serenity singing about “ToMarket” couple times yesterday.

Categories
advice and tips Fun

China trip: some random thoughts

Reading Time: < 1 minute

We took a 2 weeks China trip and came back last Monday evening. A bit exhausted, and at the end of the trip, our daughter got sick, she said she got tummy ache, and needed to go to restroom (lavatory) every 10 min. The fun part of being parents.

Some more serious thoughts

1) My parents are getting older, just as I am getting older. At one morning, my mom asked my dad: did I take the blood pressure medicine. She is not in her 70s yet, but she forgot about it.

2) Money and money: obviously this is a hot topic and it seems my family can not escape it as well. The thing makes me a bit annoyed is when they ask me how much I make in the states, as one of the very first question. It seems money is an important yard stick to measure if a person is successful or not. Btw, it seems everyone back home has more money than me. Interestingly, I read about this article yesterday, it mentioned something similar to that extent.

http://www.prospectmagazine.co.uk/politics/mark-kitto-youll-never-be-chinese-leaving-china/#.Ub54LvmThBH

3) Environment. Not so good. The air quality, and the noise is obvious. One thing a bit interesting is Serenity was curious why the car/bus beep (honk) at each other, or at pedestrian. The air at my hometown is not good due to all the container trucks (18 wheelers), and heavy industry.

4) Hard to get coffee, I mean real coffee, not those faked cappuccino ones made by machines gas station here. It’s more easier to find in Shanghai. I got my black/bare ice coffee (Mei Shi Ka Fei 美式咖啡) at Christen bakery 克里斯丁饼屋.

I will talk more later. Btw, I am seriously thinking about wrote something like my memory.