Foundation of Computer Science -- Data Structures and Algorithms

People often ask me what I do as a software engineer or what I learn as a computer science major. This is my attempt at explaining what computer science is, and hopefully in a way that anyone can relate.

###

At its core, Computer Science is about the study of Data Structures and Algorithms. Data in Data Structures is applied broadly. It can be a picture of a family member, the number 3.1415, the latest best seller song, a computer, a group of computers, or even another piece of data. Pretty much anything that can be described in human language can be defined as data. Data Structures is about finding the best way to organize data, the best way depends on the situation at hand. For example, if I'm listening to a song I want sound quality, whereas if I'm trying to find out my checking account balance I want security and accuracy. Algorithms are about the manipulation of data. Sometimes algorithms would take data as input, sometimes it outputs data, but often times it does both. Obviously, the best algorithm also depends on the situation at hand. If data structures is about the resources needed to accomplish a goal, then algorithms is about the actions needed to take in order to accomplish that goal.

These two pillars of Computer Science has a bit of history. For a while, the School of Algorithms was in power. It appeals to the intuition. How can anyone organize any data when you don't know how you're going to use them? It seems logical that Computer Science must start with the understanding of algorithms. In the golden years, algorithmists explored many properties of algorithms -- speed, security, resource usage, and so on. They used mathematics to prove the theoretical limitation of algorithms, but also used engineering to workaround the limitation. Applications of Computer Science also exploded.

Then it stalled. Too many experts from too many domains were writing too many algorithms. The problem is that their algorithms are often perfect for the problem at hand, but useless when solving even a slightly different problem. This is fine when the problem is well known, but eventually it become clear that the world is changing too rapidly to anticipate all future needs. The pure algorithm approach simply cannot keep up with the new demand. Data structurists filled in the gap.

In engineering, a good design is one that has good bones. The bones of a design is the base in which everything else is built on. In an airplane the frame is the base, and in Computer Science it becomes data. The real advancement was the invention of smarter data types. Data structurists created data that resemble algorithms. These data holds content just like traditional data, but also hold algorithms and can use algorithms to perform actions on themselves. Algorithms become data, and data become algorithms. It works beautifully because it fits into our human mental model. Suddently, we go from passive data to intelligent data, and from a command and control structure to self organizing workers. These smart datatypes has a second advantage. Developers can create new data types by deriving from existing ones, much like a child inherits DNA from her parents, but also improve upon it at the same time. This is just the solution that the industry was looking for.

###

There's a saying within the Mathematics community that a person's career is peaked when he starts talking about about math instead of doing math. Not true. Rather I want to think that I have inspired the computer scientists in all of us. Now mathematians fear.

Finance and CFA

Supposed you're an American investment company, operating in China, and managing a pension fund on behave of your client in Russia. Do you...

  1. Follow American laws, and put your Russian client at a disadvantage?
  2. Follow Russian laws, and risk getting into legal trouble in China?
  3. Follow Chinese laws, and risk damaging your brand at home?

###

I can finally take a (temporary) break from my study! What started out as an intellectual curiosity eventually grew into long nights studying, weekend review course, six textbooks, proprietary study notes, practice exams, and many, many study groups. I have had the opportunity to interact with other students across the globe online and offline, and it will be this one word that will forever bind our comradory. This word is the 'CFA'.

The Charter Financial Analyst designation is generally considered amongst the most prestigious in the world of finance. To qualify as a charterholder, a candidate must pass three levels of exams and must have four years of investment work experience. Charterholders are also obliged to adhere to a strict Code of Ethics and Standards governing their professional conduct. The exam is rigorous and comprehensive, with 7 major areas ranging from quantitative methods to portfolio management. Each year the CFA Institute incorporates new materials and latest developments into the curriculum. Some consider the exams to be an equivalent of a Masters Degree in Finance. In 2005 worldwide pass rate of Level I, II, and III were 34%, 55%, and 56% respectively. It is no surprised that only one in five of the candidates who start the program actually completes it. Of the ones who complete the charter, it takes four years on average.

Boy, I better have a very good reason to do this horrible thing to myself! I'm doing this because 1) finance is useful, 2) I work with many business analysts, and 3) I like finance.

Finance is useful.
As I gain more responsibility professionally I will probably get into a situation where I have to manage a budget. Learning how to manage resources more effectively allows me to grow and become a better employee, and now that I have studied corporate governance, shall I say serve my shareholders better? In fact, finance is the language of business, which means no matter what you do (be it R&D, Marketing, or HR) you must have some concept of management of resources. There's no other way to create a sustainable enterprise.

Even if you don't care about gaining more responsibility at the enterprise level, finance is also useful at the personal level. Since I have graduated last year I have accumulated some (albeit small amount) of money, but I'm by no means conformable with my ability to manage my finances. I was thrown into a world of financial products and terminologies that I had to navigate through. The CFA experience will hopefully put some common sense into me or at least let me evaluate a financial advisor. Wouldn't the global financial market benefit from having more informed and educated participants? I'm doing this for world peace and doing it for myself :)

I know people who work in finance.
Okay this doesn't make a very good reason, after all I know many people who are doing many things...However, because of what I do by trade I get to know and work with many business analysts. Knowing a thing or two about finance lets me speak their language and communicate more effective with my coworkers. Sometimes I even consult them on my practice exam questions :)

I like finance.
Some would say that this is the only reason matters. When I first started reading the Economist a year ago I struggled with the finance and economics articles. I struggled, but I still enjoyed them. I have taken some (three to be precise) economics and finance classes while I was in college. I find macro-economics interesting. I find international finance interesting. I was drawn to the fact that economists always seem to have a way to convert seemingly endless philosophic debates into rational decision rules and optimization problems. They make hard problems easy, though sometimes at the risk of oversimplification. I didn't have the time to explore the field further back then because I already had a major (one that I'm also very passionate about). I want to learn more about finance now.

There's another explanation to my passion in finance.

There's something romantic (despite how naive it is) about trying to understand the world through mathematical relationships. With the explosion of data and ever increasing computational capability I believe we're still in the beginning of what we as a society can do with data. Financial tools combined with my other passion (data mining) will create new possibilities, a vision that is shared by many. I believe, like any good athlete, I must too engage in cross training.

Some friends asked what have I gained financially since I started studying for the CFA exam. Let’s see...

  • Exam Registration...........$735.00
  • CFA Curriculum..............$395.00
  • CFA Preliminary Readings....$152.00
  • Saturday Review Class.......$895.00
  • Proprietary Study Notes.....$410.27
  • Proprietary Practice Exams..$107.17
You don't need a CFA charter to see that I'm at -2700 right now. On the plus side, I'm starting to understand the Economist articles and I also made a few new friends from my study sessions. If I were on a visa cards commercial I would tell you that the experience so far has been "priceless".

###

Back to the original question: I'm not going to give away the CFA answer. It is actually one of the easier questions (although I changed the wording make it seem difficult), but no doubt it’s different when you have to make a decision in real life and when the stakes are high. Business Ethics requires more thoughts...wait for Part II of this post. :p

Fujitsu LifeBook P1510 vs Motion Computing LS800

Only recently prices for TabletPC are starting to make sense, and with Microsoft's introduction of Ultra-Mobile PC this segment is getting some new excitement. I already have a ThinkPad X41 Tablet for work, but this time I want a tablet for personal use. After some research I have found 2 tablets that look like they have exactly what I want.

Before I dive into Fujitsu LifeBook P1510D vs Motion Computing LS800, why do I actually need a new laptop or a TabletPC for that matter? All the talks about TabletPC seem to focus on the medical or industrial like business use cases, what can a consumer do with a tablet?
  1. Map and driving directions when I'm on the road. Wouldn't it be cool to have Google Earth in your car or when you're hiking?
  2. Portable digital book. Gutenberg has a fine selection of free ebooks, but this applies to pdfs, webpages, magazines, articles, etc...
  3. Note taking. The power to search your class notes and lectures is just amazing.
  4. Sketch book and travel journal when I goto the park. Drawing and painting is an old college habit that I want to pick up again. Compare to pencils and paper, a TabletPC saves trees, its cleaner, and it is also easier to store/archive the final drawings.
  5. VoIP. There is a lot of talk about VoIP replacing cellphones. Whether it will happen is another story, but I'm certainly curious what the technology can do in a real-life setting as supposed to a controlled desktop/indoor environment.
  6. Act as a wireless remote control in my house so I can control my stereo, desktop, TV, etc...I don't actually need this feature right now because I don't own too many digital devices. Its still nice to know I can do that.
  7. Write TabletPC applications. I don't actually plan to do this, but its nice to know that I can if I want to.
  8. Portable computer, e.g. movie player when I'm on the plane. My 12" IBM X41 is by no means huge, but I wouldn't want to carry it around either.
  9. Personal computer. It would be nice to have a personal computer so I don't have to rely on my work laptop for everything.
Not all of these reasons apply to tablet, but many of them can benefit from being a tablet form (e.g. #2, its much more natural to read a book on a tablet than a laptop).


Fujitsu LifeBook P1510DMotion Computing LS800
9.3" x 7.32" x 1.36"/1.46"8.94" x 6.69" x 0.87"
2.5 lbs2.2 lbs
Up to 7.0 hours of battery life
LexarTM JumpDrive Sport 1 GB USB Flash Drive
Real laptop Keyboard
View Anywhere® display
Integrated Bluetooth®
$1,572.11$2,411.80

* Both machines have Intel® Centrino® 1.20GHz. 512MB Memory. 30GB Hard Drive. WindowsXP Tablet Edition.
* Prices include additional upgrades, shipping, and taxes. Price for LifeBook is after a limited time 10% off coupon. Fujitsu also has another coupon for free shipping and a free 1GB USB Drive.
* Fujitsu P1510D base model upgraded with Windows XP Tablet Edition and from 3 Cell to 6 Cell battery. The two upgrades cost $100.
* LS800 base model upgraded with ViewAnywhere (a $299 upgrade). It has WindowsXP Tablet Edition by default.
* Fujitsu upgrade from 512MB Memory to 1GB memory costs $600, whereas LS800 costs only $100. This analysis is done without the memory upgrade. The cost and value proposition will change dramatically if they're judged under the 1GB memory configuration.

Motion Computing LS800 is definitely the better tablet. It is smaller, lighter, and has ViewAnywhere® (it even rhythms!). But I have to give the final prize to Fujitsu. Fujitsu not only holds up pretty well as a tablet (almost the same size and weight), but with 7 hour long battery life it is perfect in an outdoor environment where you don't have access to power supply. Not only that, with it's real keyboard Fujitsu's LifeBook can act as a true laptop. Of course, the $800+ price difference of the two is a major factor as well. In other words, Motion Computing LS800 is a better Tablet, but Fujitsu LifeBook P1510D is a better product.

On Branding

I had the honor to stay at the Disneyland Hotel last week for a Project Management Conference. The first thing I noticed after walking into my hotel room was all the Mickey Mouse branded items. Since I was there for a professional conference I wasn't expecting to see the full cast of Disney characters in my room, which it got me thinking about the true cost of branding.


Classical supporters of advertising will quick to point out that branding creates an asset at risk for corporations. For example, if Disney doesn't produce quality ice-cream bars it will damage its reputation with consumers. Put it another way, the Disney brand is a promise from Disney Inc. to consumers of Disney products. This promise is costly to maintain and Disney deserves to be rewarded. Does that mean all branded advertisements are good? Opposition will point out that some advertisements add little in terms of value to consumers, in fact, some advertisements are misleading and manipulative.


The question is, how much value are consumers getting out of the Disney brand? Does it make me feel better (safer?) if the ice-cream bar is packaged with Mickey's face instead of wrapped in a brown paper bag from an unknown vendor? Are Disney ice-cream bars actually better? Perhaps there isn't an easy answer. Economists will argue that the price of a good is whatever consumers are willing to pay for it, but that says little in terms of optimal market efficiency. Unfortunately, before I had time to resolve this philosophical dilemma I was distracted by my Mickey Mouse ice-cream bar... :p


FIRST Robotics Competition

For the past few weeks I have been helping out at the First Robotics Competition. I was assigned to mentor a new local highschool, and since this is their first year in the competition a lot of work was put into planning the project and organizing the students and mentors. Being a "software engineer" by trade my main contribution is the team blog. Teaching the students was definitely the most exciting part. It was a lot of fun trying to find intuitive ways to describe how a computer takes human instructions and executing them. Pictures and diagrams help. The analogy of someone trying to communicate in a foreign language also helps. I also made sure we promote science and engineering by throwing in a few sales pitch.


The complete group is bigger than this, but everyone else was too busy working :p


My old highschool also has a team competing this year.

Paintball!

Paintball is actually a very physical activity. One strategy I discovered is to sneak behind the enemy line. This approach requires you to fire at the enemy from their rear and in combination with your own team's front heavy firepower. The combination of the 2 puts your enemy in an expremely tough to defend position. In fact, if this is done right sometimes you can catch them off guard from the rear!



It definitely helps to have good allies who can cover you with their fire power while you try to circle around the enemy line. Karel is someone I would call a good ally :)



A picture of the whole team!

First time EVER snowboarding

Location: The beautiful Heavenly ski resort next to lake tahoe.





Since this is my first time ever snowboarding I decided to take the 3 hour long snowboarding class for first timer. One trick I learn is that you're suppose to put your body weight in front of the board, so the picture below is actually the incorrect way of snowboarding. If it weren't because of this random person standing next to me you would think that I'm going at 100 mph... Nethertheless I still think I look pretty cool here.



And thats what happen when you put all your weights on the back of the board...



After 5 hours of snowboarding I eventually get a hang of the basics. I still fall an average of 3-4 times when I go down the green slopes, but its a start!





One final picture of lake tahoe.



Pictures are taken by Sean Gerrish

3rd and 4th day

Warren teaches in the 3rd and 4th day. His style is a combination of casual jokes and data warehousing stories, which definitely helps when the subject is 'technical architecture'.

Our little group is turning into a mailing list for the whole class! A lot of people say that they would like to join the group.

2nd Day in class

2nd day was more in depth work with Dimensional Modeling. A lot of practical knowledge, case studies, and group discussions. It was also Margy last day and tomorrow would be Warren.

A few of us in class decide to form a study group. The group is for us to share news, articles, experience, and also just to keep in touch. The goal of the group is to continue our learning even after the class.

1st Day in Data Warehouse Lifecycle in Depth

My first day experience with Data Warehouse Lifecycle in Depth.

The instructor was Margy Ross who is one of the authors of the Data Warehouse Lifeycycle Toolkit. For the record, she signed my copy of the book :)

The first half of the day is about Project Management. I'm especially appreciative of this portion of the class. The main theme of Project Management is Business, Business, Business, and Business. What do "Customers" of the DW want? What do they want now? What can they possibly want in the future? I always knew that business requirements have to be a main driver of any DW project, but it’s nice to hear it articulated. After the class I immediately called up my PM, and let him know how much respect I have for him and his work. Thanks Dan :-)

The second part is Introduction to Dimensional Modeling. The concept is fairly simple, but it’s not jargonless. We also discussed some philosophical and historical debates of dimensional modeling and the bus architecture. Something nice to know if you're planning on going to a DW party (I'll be the first one there). My take on modeling is a lot like Shirky take on ontology. The modeler has to be good at mind reading and fortune telling, which Shirky argues is a hopeless fight if your source data is the internet. I hope that doesn't apply to enterprise data warehouses...

Since I already have experience in DW the first day was a lot of reviewing for me. The most valuable asset of the class is actually the students. I've met people from many industries, many parts of the country, and we're all here as students of Data Warehousing.

Internet as a Platform

Your Next Computer - Next Frontiers - MSNBC.com: "unlike the Internet, the phone world has no open and single set of protocols for programmers to build around. Software written for one kind of phone won't work on all the others. The uncoordinated, noncommercial programming that led to the quick evolution of the Internet hasn't taken hold in the world of mobile phones."

Likewise, if Service Oriented Architecture, Network Computering, or Internet as a Platform is going to happen we need standards. We have SOAP or REST for protocol today, but we need standards for the actual programming API. Today. an application written for Google Maps is incompatible with Yahoo Maps. We need what Operating Systems to hardware drivers for Web Services.

Assuming no single company gains monopoly on the "Internet Platform", I imagine in the future each user would supply a profile of preferred platform services and each application would adjust automatically for the user. For example, my profile might say that I prefer Google Maps, Amazon Book Search, and Yahoo Search as my platform providers, whereas somebody might prefer Yahoo Maps, Ebay Book Search, and A9 Search. The benefit is of course, if I'm a premium paying customer of a particular mapping service I would benefit from a richer experience in ALL web applications.

This might not seem like a serious problem today because most services are largely identical, but as companies provide more premium services or specialized services people would want to take their subscriptions with them to other sites/applications. RSS and Atom feeds have done this nicely for data streams. I can take my feeds to any feed reader I want. A9 has proposed Open Search for search, which is one step closer.
Related Posts Plugin for WordPress, Blogger...