Mar 042012
 

Several things that I need to do but failed (failed means didn’t finish or even not started yet), I tried my best during the weekend but the progress is not that pretty :(.

I didn’t touch solr in the past week for the term vertor problem in distributed search, I’m going to try it out in the coming week but I have no confidence at all.

I do try to set up Windows Phone development environment but obvious I need more resource (read: memory) on either the Windows laptop or Windows VM on MBP, I even upgraded my Windows laptop (an HP) to Windows 7. However, it seems memory is still the problem. My next step is raising the memory for VM on MBP to 4G (later 6G, maybe) to see if it works better, but that will make WP7 development really a occasional hobby as I cannot leave it up and running for all the time. Pity MBP supports 8G memory only, I think under 16G I will have enough headroom for everything.

Playing with Android is still a fun, or maybe funny? hehe. I started working on that but Eclipse’ or Android’s UI designer really sucks, I still need sometime to get used with it. I wish I can get this part done faster as this could be the only platform that I can try without cost.

Since the mail team was kind of slow releasing whatever we want, so I started digging into alternatives to see if I can speed up a little bit – I constantly update and build Android clients and also tried to build up some backend features with open source projects, this involved Postfix, atmail/roundcube, solr, and so on. This part didn’t go well either, mostly because I stuck in the front end features, and turned me back to backend stuffs again, but that means I’m not that helpful to the current project since front end features are much more important, at least at this stage.

Terminology extraction is much better than other projects, at least I finished a demo for JS extraction, it works wel for 95% cases, pity for those 5% leftovers, I cannot do anything about it since they have have either HTML mess up, or JS conflicts (well, maybe I can do something for later one, but not now since this is not a serious project so far).

What else? hmmm … seems almost all batteries @ home are having problems, from cell phone to lawn mower, from blower to iRobot. I did a lot research in the past couple of days on Lead Acid, Ni-Cd, Li-Ion, 12V, 18V, 24V, purchase, recycling, and so on, but good thing is that I’ve put all necessary orders and now just want for those batteries arriving.

Nothing else I think … the office will have network tuned in the coming week, probably I will have to run my own Wifi after that :-$

Feb 012012
 

Here comes 3rd wave …

1. compare strings
It seems NSString did not overload the compare operator (==), or maybe Object-C does not have this kind of idea, so don’t use == to compare strings, instead, you need to use compare: or caseInsensitiveCompare: and their dialects.

2. catching cell selection event in a table view
I was trying to subclass UITableViewCell to make it works, but actually don’t have to be this complicated – all that I need to do is deal with “- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath” in the table view, and this saves me a lot of effort as I don’t have to go through all the difficulties to get storyboard, etc with codes within a Cell class.

3. singleton, property or method?
I created a singleton class, then found in Object-C, it’s better to static method (if you can) instead of property. It takes quite a lot keystrokes to use a property, while using method is not that hard.

4. passing data to a view controller in a storyboard based application
– define a property of the child view controller for holding data
– in parent view controller’s prepareForSegue, set the property of the child controller
– that’s it …

Jan 302012
 

Here comes the second part of ios development tips which follows first part, I’m starting over the number now so to ease my life.

1. How to navigate to a view in another view
– original post is here:
* dealing with views in a storyboard based application
* some other helpful discussions are here: manually switch view controllers in storyboard, and another similar topic
– idea
* actually the basic idea is pretty simple and straightforward – you create a new view (the one you want to display), and push it to the top of the navigationcontroller (which actually is a stack), that’s it …
* tricky part #1: this cannot be done in a viewDidLoad event as view was not fully loaded at that time so you can nothing, the place I found that is workable is viewDidAppear event
* tricky part #2: ViewController’s initWithNibName does not work … I haven’t figure out the exact reason yet but you have to use instantiateViewControllerWithIdentifier comes from storyboard
* tricky part #3: nibname … gave me QUITE A LOT headache, it should be “UIViewController-“, you can get the object ID from Interface Builder, in the identity inspector tab

Jan 102012
 

I know this could be a crazy thing, but why not? Especially I have a Mac in hand so that I can do both at the same time.

Since I know almost nothing about either, and I’m not good at client side development at all, so I started with a not-that-complicated open source software, WordPress for iOS/Android. It’s good to see WordPress is almost the same on both platform, this will help me a lot in future work.

The bad thing is, WordPress does not have too many features, such as animation, and so on (sorry all that I know about “fancy” is animation …), so I can only learn basic coding stuffs, but I think it is good enough for now. Anyway it is a API based “flat” App, which has a pretty wide market – think about Amazon AWS manager (I need this), E*Trade App (I’m using this), and GMail client, etc.

Dec 102011
 

Life may be a circle, but I wish it is not a flat circle ๐Ÿ™‚ .

I’m packing now, walking in the nearly empty apartment I found that it looks like whenever I just moved in 18 months ago. I cannot believe I moved in so many stuffs that after several times of flying back to Beijing with big suitcase, plus 4 pack of clothes, and 3 boxes of miscellaneous goodies, I still have enough to fill up two suitcase that will fly back to Beijing with me week after the next.

I wish my career life won’t be a circle either but seems to be some sort of true ๐Ÿ™ . Good thing is that after acting as different management roles, I found out that I can deal with engineering and production jobs easier but not business positions, at all. However, 18 months experience gave me great confidence on dealing with brand new teams, while I was really not good at this in old days.

I wish my technical skills can be a circle ๐Ÿ˜› . I’m playing with NetBeans to do Android development, while Xcode for OSX and iOS. There is not much progress so far but I do wish I can pick client side development as soon as possible.

Jumping between US and China, I think the most significant change is that I’m now feeling comfortable with travelling around, even to a strange place.

Too much to say … in two weeks I’m going back to US, wish everything will be fine and I’m going to planning for my next 10 years.

Stay tuned.

Jul 132010
 

Time to get hands dirty in Java mud ๐Ÿ˜€

Lots of projects here are Java based, plus something like Struts, Spring, Hibernate, etc.ย I don’ t like the structure much but I have to understand how to get things done, or at least I need to be able to read those codes and configurations (I hate so many configuration files in Java world).

I was trying to setup Eclipse with Struts2 and Tomcat, I was so amazed by memory management in Java VM, want to know my impression? In one world, MESS. >:) After dealing with this and that kind of all sort of “MaxXXXSize” configuration directives (or command line parameters), I finally figured out “-XX:MaxNewSize=128m” and “-XX:MaxPermSize=128m” are two of the most important parameter to make Eclipse stop reporting “PermGen Space” error.

Thinking of setting up such an IDE really takes time, I was thinking maybe I should go back to my vim time …

BTW, people here developing software on local machine (I mean desktop), Java is cute in this case – write once and run everywhere.

Mar 132010
 

I think I have luck, or 6th sense, or whatever, on technical areas. I used to learn something new just for fun, but later on this “something” helped me a lot on some serious projects.

The most recent sample is Cassandra, I started playing with it since last Sep or Oct, it was just because I heard of this “NoSQL” idea and it was trying to solve the problem I’ve been working on for so long (BTW, I used to use LDAP). Then among all those NoSQL solutions, in couple of weeks I locked myself on Cassandra.

Then my team switched from old project to the new one (start from Nov last year), and I got involved starting from this Jan (was doing transition prior to that). I heard about lot of different description about the project, but have no idea until Feb (yes, a month after I join the new project). Then, I found that knowledge I learn from Cassandra helped me really a lot, things like consistent hashing, dynamic deployment (adding/removing nodes, etc), and things like Avro (I don’t know how much Cassandra is using it, but it was the first time I heard of it).

Actually there was another team was trying to use Cassandra for their new project, but executive (I’m not sure which level, maybe SVP or EVP) forced them moved to in-house solution, which is what we are working on, I don’t the story behind that, but you can definitely get the idea of how similar these two are.

Anyway, I think it’s time to try something new as I need to prepare for my next project, it used to take 6 months or so.

P.S. previous samples (for all those I can share with public):

  • I started playing with HTTP/Socket, 8 months later I got a job from a web company. I was trying to let multiple clients using single mainframe connection (the whole office of ~15 people got only one connection as it was expensive and difficult to setup), it became a bridge based on TCP (TCP was still fancy at that time in my industry), then found that I can actually use it to serve queries over the web so I setup a Web server for that (over IIS I remember), etc.
  • I started playing with Linux on my home machine, about 9 months later company officially announce that we are moving to RHEL. In the first 3 months of migration, I got huge number of pings from developers (FreeBSD experts) from different team over the IM, asking me this or that kind of question, and the most popular question is “how can I find out if this package got installed on my box?” and the answer is “rpm -qa | grep -i package-name” :-W …
  • I started playing with MySQL (actually for a friend’s web site), 5 months later I became a heavy MySQL user/admin (I beat Oracle guys at that time, yeah)
  • I started playing Windows SDK to do some desktop development, 3 months later one of my friends asked me to build a music player – that was a crazy project, I finished the first version in Delphi, my friend told me she can only find C++ developers, so I deliver a C++ Builder version, then she mentioned actually those developers know VC++ only (so there are lots of “C++” under Windows >:) ), so the final version was actually VC++ Express
  • and other 2~3 cases that I don’t think I can share as there are some internal terms which could be corporate trade secret …

Sure there are some other negative cases, the most significant is Ada – I spent quite some time on GNAT, etc, did pretty much development, but so far I’m not seeing any possibility to utilize it in any projects.

Jan 092010
 

I’m thinking of getting my home development environment another plan – instead of running couple of VMs on a single big box, maybe I can use couple of small computers to get things done.

This could be possible after checked online, though price may be higher. I’m still looking for single board computer/client computer that are as small as a CD box (or a little bit bigger), does not have to come with a disk as I can run NFS for it, and it does not have to be x86 based as I can run Linux on almost all sort of CPUs.

Will see.

Jan 012010
 

Here are current setup:

  • data server d1: Fedora 12
  • data server d2: openSUSE 11.2
  • data server d3: CentOS 5.4
  • shared host f5: Debian 5.0.3, this is the machine act as NFS server, LVS director, and login bridge box
  • client machine c1: Ubuntu 9.10, this is the pure client host, doing all development and initiate testing traffic
  • client machine c2: Gentoo 1.12.13, actually this is the web server running apache+wsgi

d1~d3 and f5 are running on the dedicated box with ProxMox, while c1 and c2 are running on a Windows Vista machine with VirtualBox.