Tuesday, March 13, 2012

PHP Study



What is it?

Scripting Language
Server Side Language
EasyPHP Software

What can it do?

Take information from forms and store it in a database
Run threaded discussions
Serve XML pages
Build Web Applications

Value Data Types

PHP is a loosely-typed language. A variable does not need to be a specific type and can freely move between types.

Naming Rules

The first character must  be the dollar sign ($).

Variables are case sensitive.

HTML, CSS and JavaScript study



HTML -> structure 

HTML is HyperText Markup Language.

HTML is a formatting language rather than programming language.

Data informs markup.

Recommended (HTML5) DOCTYPE


CSS -> presentation

CSS is Cascading Style Sheets

Inline, Embedded and External CSS.

CSS Semantic:Selector, Declaration, Cascade.


JavaScript -> behavior

JavaScript makes pages interactive.

Embedded JavaScript is easy for maintaining.

External JavaScript is great.

JavaScript is a programming language.

Variables, Operators, Strings, Arrays and Functions, Conditionals, Loops, Objects (Properties and Methods). 

The DOM (Document Object Model).

Events occur whenever actions happen on the page.

You can attach listener functions to an event on an element.

Object detection

You can change the style.

You can change the class(es).

You can alter default events. (Browsers have default events like having default CSS)

Monday, March 12, 2012

The Google Resume reading notes 3

Chapter 3 Getting in the Door

The Black Hole: Online Job Submission


Making the Best of the Black Hole


To increase your chances of getting a call, make sure you follow every instruction

Second, if the job opening is fresh, apply quickly.

Third, put yourself in the shoes of the hiring manager.

Fourth, remember that just because you discover the opening through a job web site doesn't mean you have to apply through it. (Send a personalized note to the recruiters or hiring mangers)

Getting a Personal Referral 


Tell Your Friends


Make Yourself Known 


Blog, LinkedIn, Facebook and Twitter communication

The Informational Interview


Reach Out to Recruiters

A quick Internet search with a query like will turn up recruiters from virtually every major company.

Alumni Network and Beyond


Career Fairs

Do your homework
Prepare questions
Prepare answers
Practice your elevator pitch
Tailor your resume
Dress appropriately
Follow up

a portfolio of projects
How did you build it? What did you enjoy? What did you learn? What was the hardest part?

Contract Roles

A contract role can be a wonderful way to have flexibility in life (nine months on, three months of vacation!) or to experience a company sans commitment.

To transfer to full-time employee (FTE) , you need to perform well, build connections, discover open positions, and, yes, interview just like anyone else off the street.

Get Creative 

Example, import  resume to Google Docs

Quality, Not Quantity: How to Build a Network that Works

Networking is about what you do when you don't need a network.

Be giving/ Be open / Be the connector

Immerse Yourself in Start-ups

Contributing Online

Create a web site
Start a blog
Write guest blog posts
Answer questions
Get involved with GitHub

The Google Resume reading notes 2

Chapter 2 Advanced Preparation

What Can You Do: An Overview
Develop a track record of achievement
Learn to write and speak
Emphasize depth over breadth
Become a leader
Find a mentor (or become a mentor)
Develop a tangible skill
Learn about technology

Academics

Get Project Experience

Grade Point Average: Does It Matter and What Can You Do?
Companies care about what you can actually do, and your interview performance is generally considered a better indication of that than some silly number.

Doctor Who? Getting to Know Professors
Get involved in their research
Ask them for help
Become a teaching assistant
Lunch, coffee, or office hours

Work Experience

Make an Impact
Think broadly
Be really, really good at what you do
Solicit feedback proactively
Learn about other teams

Become a Generalist

The best program managers, the best markets, and the best developers have something in common: they each understand the others' roles.

Understanding the roles around you will enable you to perform better at your own job by offering greater context, while also offering you transferable skills.

Size Matters: Quantify Your Impact

Can you quantify its impact in terms of dollars, hours, or reduced sales calls? Seek out this information when it happens to ensure that you can get the most precise, accurate data.

Part-Time Jobs and Internships
Help a professor out with research
Contact a start-up
Volunteer for a nonprofit

Remember that experience builds on itself. (Web Development->Microsoft->Apple->Google)

The Google Resume reading notes 1

The Google Resume is written by Gayle Laakmann McDowell and it worth reading for the ones who want to join in the field of technology.

Chapter 1 Introduction

Work/Life Balance

Moving Up: Individual Contributors

The Differences

Amazon, many would argue, is more of a retail company than a software company. It is leading in multiple industries (retail, cloud computing,  etc.) largely because of its technical innovation.

Apple is just as secretive inside as it is outside.

Microsoft has dabbled (and reasonably successfully) with search and the web, but a large chunk of its earnings come from Windows and Office.

Google is the nerdiest of nerdy.


Big vs. Little: Is a Start-up Right for You?

The Good
Diversity of skills
Leadership opportunities
Control and influence
Rapid results
High reward

The Bad
Long hours
Unclear job description 
Low pay
Limited credibility
Less mentorship

The Job Title: What Do You Want to Be When You Grow Up?

What Do You Need?
Money
Recognition and respect
Work/Life balance

How Do You Enjoy Working?
Teamwork vs. independent work
Creating vs. maintaining
Leading vs. joining

What Are You Good At?
Numbers
Writing and communication
Creativity
People skills


Sunday, March 11, 2012

Cloud Computing Paper Reading Summary 4

In the tech report Above the Clouds: A Berkeley View of Cloud Computing, which is published by Reliable Adaptive Distributed Systems Laboratory Professors in UC Berkeley, these authors summarized about almost every aspects of Cloud Computing and predict the future of Cloud Computing.

2. Cloud Computing: An Old Idea Whose Time Has (Finally) Come

What is Cloud Computing, and how is it different from previous paradigm shifts such as Software as a Service(SaaS)?

Why is Cloud Computing poised to take off now, whereas previous attempts have foundered?

What does it take to become a Cloud Computing provider, and why would a company consider becoming one?

What new opportunities are either enabled by or potential drivers of Cloud Computing?

How might we classify current Cloud Computing offerings across a spectrum, and how do the technical  and business challenges differ depending on where in the spectrum a particular offering lies?


What, if any, are the new economic models enabled by Cloud Computing, and can a service operator decide whether to move to the cloud or stay in a private datacenter?


What are the top 10 obstacles to the success of Cloud Computing---and the corresponding top 10 opportunities available for overcoming the obstacles?


What changes should be made to the design of future applications software, infrastructure software, and hardware to match the needs and opportunities of Cloud Computing?


3. What is Cloud Computing?


Cloud Computing refers to both the applications delivered as services over the Internet and the hardware and systems software in the datacenters that provide those services. The services themselves have long been referred to as Software as a Service (SaaS). The datacenter hardware and software is what we will call a Cloud.


Factors might influence these companies to become Cloud Computing providers:
1. Make a lot of money.
2. Leverage existing investment.
3. Defend a franchise.
4. Attack an incumbent.
5. Leverage customer relationship.
6. Becomes a platform.


4. Cloud in a Perfect Storm: Why now, Not Then?

4.1 New Technology Trends and Business Models.
4.2 New Application Opportunities
Mobile interactive applications.
Parallel batch processing.
The rise of analytics.
Extension of compute-intensive desktop applications
"Earthbound" applications

5. Classes of Utility Computing

Azure is intermediate between complete application frameworks like Google AppEngine on the one hand, and hardware virtual machines like EC2 on the other.

Different tasks will result in demand for different classes of utility computing.

6. Cloud Computing Economics

6.1 Elasticity: Shifting the  Risk 
"pay as  you go"
usage-based pricing
Few users deliberately provision for less than the expected peak.


6.2 Comparing Costs: Should I Move to the Cloud?
Pay separately per resource.
Power, cooling and physical plant costs.
Operation costs.
Tasks are shifted to the cloud provider.
Costs will be lower for managed environment than for hardware-level utility computing.

7. Top 10 obstacles and Opportunities for Cloud Computing

Each obstacle is paired with an opportunity.

#1 Obstacle: Availability of a Service


Simple Storage Service (S3)


The only plausible solution to very high availability is multiple Cloud Computing providers. (The best chance for independent software stacks is for them to be provided by different companies.)


Another availability obstacle is Distributed Denial of Service (DDoS) attacks.


The longer an attack lasts the easier it is to uncover and defend against.


#2 Obstacle: Data Lock-In



Concern about the difficult of extracting data from the cloud is preventing some organizations from adopting Cloud Computing.


1. The quality of a service matters as well as the price, so customers will not necessarily jump to the lowest cost service.


2. In addition to mitigating data lock-in concerns, standardization of APIs enables a new usage model in which the same software infrastructure can be used in a Private Cloud and in a Public Cloud. Such an option could enable "Surge Computing" in which the public Cloud is used to capture the extra tasks that cannot be easily run in the datacenter (or private cloud) due to temporarily heavy workloads.

#3 Obstacle: Data Confidentiality and Auditability

#4 Obstacle: Data Transfer Bottlenecks 



Applications continue to become more data-intensive.

One opportunity to overcome the high cost of Internet transfer is to ship disks.

A second opportunity is to find other reasons to make it attractive to keep data in the cloud.

A third, more radical opportunity is to try to reduce the cost of WAN bandwidth more quickly.

#5 Obstacle: Performance Unpredictability  


I/O sharing is more problematic.


One opportunity is to improve architecture and operating systems to efficiently virtualize interrupts and I/O channels.


Another possibility is that flash memory will decrease I/O interference.


Another unpredictability obstacle concerns the scheduling of virtual machines for some classes of batch processing programs, especially for high performance computing.


Many HPC applications need to ensure that all the threads of a program are running simultaneously.
Thus, the opportunity of overcome this obstacle is to offer something like "gang scheduling" for Cloud Computing.


#6 Obstacle: Scalable Storage


The opportunity, which is still an open research problem, is to create a storage system would not only meet these needs but combine them with the cloud advantage of scaling arbitrarily  up and down on-demand, as well as meeting programmer expectations in regard to resource management for scalability, data durability, and high availability.


#7 Obstacle: Bugs in Large-Scale Distributed Systems


A common occurrence is that these bugs cannot be reproduced in smaller configurations, so the debugging must at scale in the production datacenters.


One opportunity may be the reliance on virtual machine in Cloud Computing.


Since VM are de rigueur in Utility Computing, that level of virtualization may make it possible to capture valuable information in ways that are implausible without VMs. (de rigueur: prescribed or required by fashion, etiquette or customer)


#8 Obstacle: Scaling Quickly


Google AppEngine automatically scales in response to load increases and decreases, and users are charged by the cycles used. AWS charges by the hour for the number of instance you occupy, even if your machine is idle.


One RAD Lab focus is the pervasive and aggressive use of statistical machine learning as a diagnostic and predictive tool that would allow dynamic scaling, automatic reaction to performance and correctness problems, and generally automatic management of many aspects of these systems.


Another reason for scaling is to conserve resources as well as money.

#9 Obstacle: Reputation Fate Sharing

#10 Obstacle: Software Licensing 

The primary opportunity is either for open source to remain popular or simply for commercial software companies to change their licensing structure to better fit Cloud Computing.

8. Conclusion and Questions about the Clouds of Tomorrow

Application Software

The client piece needs to be useful when disconnected from the Cloud, which is not the case for many Web 2.0 applications today.  (Evernote?)

Infrastructure Software
Hardware System


Change In Technology and Prices Over Time


Will technology or business innovations accelerate network bandwidth pricing, which is currently the most slowly-improving technology?


Virtualization Level:


Dominated by low-level hardware virtual machines like Amazon EC2, intermediate language offerings like Microsoft Azure or high-level frameworks like Google AppEngine?

Friday, March 9, 2012

Cracking The Coding Interview reading notes 1

At the Interview | Handling Behavioral Questions

Structure Answers Using Situation (Scenario) - Action - Result

Ex: in operating system project a guy struggled and discuss few in emails, then the actor communicated with him and that guy performed better.

General Advice for Technical Questions

Interviews are supposed to be difficult. If you don't get every -or any-answer immediately, that's ok! According to author's experience, 10 of 120 people finished right instantly.

So when you get a hard question, don't panic. Just start talking aloud about how you would solve it.

You're not done until the interviewer says that you're done!

Five Steps to a Technical Question


1. Ask your interviewer questions to resolve ambiguity.
2. Design an algorithm.
3. Write pseudo-code first, but make sure to tell your interviewer that you're writing pseudo-code!
4. Write your code, not too slow and not too fast.
5. Test your code and carefully fix any mistakes.

Step 1: Ask Questions

Good questions might be like: What are the data types? How much data is there? What assumptions do you need to solve the problem? Who is the user?

Step 2: Design an Algorithm

1. What are the space and time complexities?
2. What happens if there is a lot of data?
3. Does your design cause other issue? (i.e., if you are creating a modified version of a binary search tree, did you design impact the time for insert/ find/ delete?)
4. If there are other issues, did you make the right trade-offs?
5. If they gave you specific data(e.g., mentioned that the data is ages, or in sorted order), have you leveraged that information? There's probably a reason that you're given it.

Step 3: Pseudo-Code

Writing pseudo-code first can help you outline your thoughts clearly and reduce the number of mistakes you commit.

Step 4: Code

You don't need to rush through your code; in fact, it will most likely hurt you. Just go at a nice, slow methodical pace.

1. Use Data Structures Generously: Where relevant, use a good data structure or define your own.

(i.e., what structure used to represent a person, which shows caring about object oriented design)

2. Don't Crowd Your Coding.

Step 5: Test

1. Extreme case: 0, negative, null, maximum, etc.
2. User error: What happens if the user passes in null or a negative value?
3. General cases: Test the normal case.

If the algorithm is complicated or highly numerical(bit shifting, arithmetic, etc.), consider testing while you're writing the code rather than at the end.

Also, when you find mistakes(which you will), carefully think through why the bug is occurring. Don't try to make "random" changes to fix the error.

When you notice problems in your code, really think deeply about why your code failed before fixing the mistake.

Before the Interview | Technical Preparation

Data Structures

Linked Lists
Binary Trees
Tries
Stacks
Queues
Vectors / ArrayLists
Hash Tables

Algorithms

Breadth First Search
Depth First Search
Binary Search
Merge Sort
Quick Sort
Tree Insert / Find /etc

Concepts

Big Manipulation
Singleton Design Pattern
Factory Design Pattern
Memory (Stack vs Heap)
Recursion
Big-O Time