4 weeks from today I will finish my 4th semester at CMU SV. And after that I will have 2 semester left before I can finally graduate and get my degree.
God knows how I struggled all the way till here, ever since I signed up this program I’ve pretty much said goodbye to the life when you can go to bed before 2AM. I even made a job transition in between and relocated to a place 45 miles away from my last apartment. Imagine life with 2 hours commute and at least 2 hours reading/writing after 8 hours of working, that was me months ago. This was so challenging to me because I always stink in time management, it is very easy for me to lose focus because my idea always jumps around, like right now I am supposed to keep reviewing our team draft for task 2 at school but instead I am writing this blog because I just realize it has been 2 months since my last post. And what’s worse, I am not someone who can multi task well. My brain can only run in one process. All the tasks has to take Round Robin or use a token ring to keep alive in my memory cycle. So I lost a lot of time.
I need to get back to my review.
And I am talking about a part time program. I kinda doubt it, so I dedicate this post to keep track about what happened during each of our 4 tasks and hopefully this will give me a better sense when I come back and review what I learned from this class.
The starting point and the first task went though OK, it took me a while to analysis Google’s business characterization but with the guide line I found that I can easily nailed it down. I am feeling fine after task 1
But good feelings only last until I hit the second one. In task 2 we are doing “Market Analysis and Business Strategy” and first sub task is to create the outline of our report, the report is 4-5 pages long and the well, the evaluation checklist takes about 2 pages long and contains tons of questions that we are supposed to answer in our report/outline, the worst thing is, trying to fit them all into the outline will make the outline itself become more than 3 pages long, but it is very hard to tell which one goes to report only because almost all of the questions are regarding content coverage. Besides, writing something against a question list is a huge downer for me, I found myself often struggles with balancing in keeping my creativity and making sure I follow those stupid rules. (Maybe business hates creativity, I don’t know) The schedule is also something I don’t 100% get: you pretty much have to conduct your SWOT/PEST and business strategy analysis to make sure your outline has appropriate coverage, and they have to happen in the first week of the two week period, and then you get almost equal time left to put more details, which you should already find when you conduct your analysis(otherwise where did you draw your conclusion from?) so basically by spliting this task this way we totally force the effort to be unevenly distributed. I have high respect to whoever made the schedule this way, but I guess I just don’t see it making sense in terms of effort distribution. Why can’t we put SWOT/PEST as task in week1 and business strategy analysis in week2 to distribute the effort to make the effort distributed more evenly? I am kinda disappointed about this class after this week.
TBC on task 2 week2, task 3 and task 4.
Man, I left here for so long.
Never thought I could be gone so long but life’s been changing so dramatically for me for the last few months that I’ve never found the right mood to write anything. Things include : lost 50 pounds in a year (still a fatty though…working hard to get rid of that realm), learned and fell in love with swimming, moved to East bay and brought a condo here in Oakland (with my parents help of course)…and got used to go to bed after 2AM everyday to finish paper for school (1 year to go!)…
There are couple of things happened recently made me realize that rushing is not necessarily 100% a perfect thing, sometimes I need stop and think.
Writting this blog may not be the best way, but at least it force me to think, to orgnize my thoughts, so it will help.
So here I am, back to here, start my new journey.
Part of my end of semester reflection at CMU:
1. For Pair Programming, never even try to do it in three instead of two, it is pure waste of time for at least one of you and you can finish so much more without losing any quality if you do it in two. Do it in two and only in two. Two is company, three is a crowd. We want company, we don’t want crowd.
2. Allocate tasks so some of them can be taken care of individually. never try to solve every tasks in pairs. After three months of practice I’ve learned that XP is not about pair programming on everything, although pair programming is a very important practice of XP. If the coding goes ultra smooth then great, we are all happy, otherwise you and your partner will both stuck into a dead silent with only one screen to look at ( and I am not only talking about debuging). Feel blessed if you can talk and think different things at the same time, otherwise unless you and your partner’s thoughts are 100% syncronized, which is almost impossible, one of you will have to drop your thoughts because whatever you were planning to do is not gonna happen right away.
3. have a good UI designer is very important
4. Rails sucks, I want Django.
5. If necessary, wake up your customer representative as soon as possible. Ugly surprise is waiting for you in the near future otherwise.
I’ve recently fell in love with python’s logging and traceback, while the former module offers a very easy way to organize my logs, the later one simply just a great friend when I am debugging my crappy code. Making them work together was very tricky for me because traceback’s print_exc, which by the way is the most frequent function I’ve been using, can only print to stdout or a log file while logging has already wrapping up that log file as object. I’m really not into the idea of interrupting logging and quickly open the file and then insert the traceback info, then close the log file idea. I think there should be more elegent way of doing this. And then I found StringIO, so the code can be written like this:
import traceback, StringIO, logging
fp = StringIO.StringIO()
try:
l = []
l[4]= 7
except Exception, err:
traceback.print_exc(file=fp)
message = fp.getvalue()
print message
logging.basicConfig(level=logging.DEBUG,
format=’%(asctime)s %(levelname)s %(message)s’,
filename=’myapp.log’,
filemode=’w')
logging.debug(’A debug message’)
logging.error(message)
A question I posted to baypiggies maillist but so far no one has replied it yet:
I’m not sure why, maybe because the question is too hard/easy that nobody is interested
or nobody understands my poor English…
My python code is reading some xml files that have several shell
style environment variables like “$_” or “$$”.
for example:
/tmp/$$.log
I need to extract them and translate them into real value when I read the file.
Now I can only think of two ways of doing this,
1 is to have a big dictionary in my python code which have all the
mappings from shell to python os module(or others as well)
another way is to get shell involved and have it pre-process the file,
but I’m afraid that way some of the values may not be well translated
since the context switch (like the pids, etc).
Right now I’ve taken the first approach and built a dictionary in my module.
It certainly works but I really don’t like this idea.
Will need to investigate more about how python translate those environment variables on its lower level to see if there is anything I can manipulate
urls = re.findall("http://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+", page)
emails = re.findall("[a-zA-Z0-9+_\-\.]+@[0-9a-zA-Z][.-0-9a-zA-Z]*.[a-zA-Z]+", page)
ips = re.findall("(?:[\d]{1,3})\.(?:[\d]{1,3})\.(?:[\d]{1,3})\.(?:[\d]{1,3})", page)
When I was told the orientation for my CMU program this weekend will last two and half days, from 9AM to 8PM, I was a little bit shocked and concerned. Not only because I am so not a morning person, but I’ve also had some really bad experiences about orientations in the past which was pretty much filled with ultra boring (and sometimes even unrelated to most of the audiences) lectures. Or different speakers just went thru the same instructions over and over again until everyone’s pretty much in the mood of doing something else, like sleeping 
I was very afraid that this one is going to be the same, only even longer, especially after having received a lot of highly detailed documentations and attended a very intuitive online conference(By the way, thanks Diana, Gerry and Jazz for that!). I’ve already got all the accounts set up, tuition paid, textbook bought and readings read a month ago. I somehow even felt I can start right there. “I’m ready” I told myself.
Now that two days has passed and I gotta say, I had such a great time that I really wish that it could be longer. It was so well organized and fulfilling that I didn’t feel that any of my time was wasted.
(Alright, will come with details tomorrow, really gotta a lot to say but have another struggle in bed to get up tomorrow morning at 8:00AM) TBC……
without sudo
make CPPFLAGS=’-D”Py_HUGE_VAL=HUGE_VAL()” -I. -I$(srcdir)/Include’ LD_RUN_PATH=’XXX‘
^(-*\d+[\.\d+]*\|){2}(\d{1,3}\.){2}\d{1,3}\|[Y|N]\|\.*\|\d{1,4}\|\d+[\.\d+]*\|[\s]*\w[\w|\s]*\|\d+\|(-*\d+[\.\d+]*\|){2}\.$
Man, sometimes you just wish you have a regular expression to generate another regular expression.
I really love my discovery today , it makes my life so easy. Kodos to Kodos, you complete me…