Wednesday, September 29, 2010

Set Default Priority for all Processes for a Specific User

A few years ago, my server has been DDoS. There were more than 7000 connections. I couldn't ssh into my servers to monitor what was going on live. After that, I found out a trick that you could set the priority for any running processes.

But it's very inconvenience as most server services are auto start. Anyway, there is an easier way to get this problem resolve. Linux allows us to set the default priority for all processes for a specific user. By giving www-data user a lower priority, I can ssh into the server even if it's under attack. Assuming that we have sufficient memory. 
sudo vi /etc/security/limits.conf
The configuration syntax is as follow:  
[username] [hard|soft] priority [nice value]
Insert the following line:
www-data hard priority 10
Now, reboot the server.

To verify that you've done it correctly, run top:
Expected results should be similar to this:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  GROUP    COMMAND
 1295 www-data  20  10 33688 6388 2544 S    2  0.2   0:00.32 www-data apache2
 1296 www-data  20  10 33064 6100 2492 S    2  0.2   0:00.35 www-data apache2

Monday, September 27, 2010

Experian Hitwise - Company Profile

Hitwise Home 
Custom Data & Analytics
  • Has the largest online customer behavior datasets
  • Solve marketing objectives 
Each day, Hitwise analyzes more than 3 million Australian Internet users interacting with more than 1 millions websites across 165+ industries.


Products & Services

Competitive Intelligence
By analysing user browsing pattern, Hitwise identifies online marketing opportunities for clients. This information can be used to compare with competitive websites.

Features
Hitwise Rankings - provides an instant overview of key players and fast-moving websites across 160+ industries.

Hitwise Search Intelligene - provides extensive insights on how people have searched for products and services across all major search engines.

Hitwise Clickstream - provides extensive reports on upstream traffic and downstream traffic from a specific website, industry or category. 

Hitwise Demograhics - visistors' profile including age, gender and geographic location.

Hitwise Lifestyle - identifies the top performing sites that attract your most desirable customers. 

Hitwise Conversions - how customers interact with specific sections on competitive websites. Also show which customer acquisition tactics have proven to be the most successful.

Hitwise Charting - create customized charts how websites, industry categories or search terms against each other.

Hitwise Customization and Alerts - email notification when there is a change in competitive activity within your industry.

Hitwise Dashboards - view all your favorite report from one single page.

Hitwise Custom Data and Analytics - Hitwise has 25 millions internet users world wide and enormous proprietary datasets to deliver information and analysis to specific business objectives.

Hitwise University - training and eduction resource for all Hitwise clients.


Search Marketing
Hitwise specialized in  Search Engine Optimization, Pay Per Click, Conversion Optimization and Analytics since 1997.

Pay Per Click - provides a complete end-to-end solution for small and enterprise businesses that will increase return on investment, drive sales and leads at a lower cost. It's 100% transparent and measurable.

Search Engine Optimization - focus on strategies that maximizes search engine visibility and apply best practices to deliver return on investment for clients.

Conversion Optimization - making it easier for customers to take action such as buy a product on your website.

Analytics - comprehensive Analytics services that help clients better understand their online visitors and to reach them effectively and efficiently. 


Search Engine Optimization
The art and science of increasing your website visibility to search engines for those important keywords and phrases that are relevant to your business. 

How we do it
Understand the behavior of clients' customers, how they search and ultimately drive them to the most relevant content of your website.

Model
Business Objective -> Measuring Progress Against Objectives -> Unique Technical Recommendations - >Market Research -> LOOP
  • Business Objectives - achieving clients' objectives; increase sales, lead, market share or brand awareness.
  • Market Research - Hitwise have access to the habits of over 3 million Australian internet users. We know what they are searching for and how to reach them.
  • Recommendation and Implementation - provides clients with the most effective recommendations to help achieve their objectives.
    • Keyword Research
    • Competitor Research
    • On Page Optimization
    • Site Wide Recommendations
    • Link Discovery
    • Link Building
    • Actionable Recommendations So You Can See Results
  • Measuring Progress Against Objectives - Ongoing review and analysis of progress against objectives helps to ensures clients key performance indicators are achieved and maintained.
    Parameters measured:
    • Rankings
    • Traffic
    • Sales
    • Leads
    • Conversions
    • Channel performance

About Us

  • Provide data and analytical tools to clients in more than 65 countries. 
  • Over 100,000 clients and annual revenue of nearly $4.0 billion. 
  • Over 15,000 employees worldwide.
  • Help clients protect and grow their market share.
  • Has the largest sample of internet users of 25 million worldwide, including 3 million in Australia.
Company Milestones
1997
  • Founded by Adrian Giles and Andrew Barlow as Australasia's first search marketing and consulting company (Sinewave Interactive).
  • R&D begins into popularity based search engine (Top100.com.au) and Hitwise Rankings service.
1999
  • Top100 Search Engine launched as the world's first popularity based search engine using ISP data.
2000
  • Hitwise Competitive Intelligence Service is launched with ranking, profile and charting features only. Subscription to the service sold directly over the internet.
2001
  • Launched Clickstream counting technology
  • Launched Hitwise New Zealand
  • Launched Hitwise Hong Kong
  • Launched Hitwise UK
  • Launched Hitwise Singapore
2002
  • Awarded 5th fastest growing technology company in Australia by Deloittes
  • Awarded 10th fastest growing technology company in Asia by Deloittes
  • Acquired IP assets of Plurimus Corporation in USA
  • Launched Hitwise Demographics, Benchmark Reports and Media Alerts
  • Formed alliance with Media Monitors to license media alerts technology
  • Grew sample size to 13M Internet users and 200,000 websites
2003
  • Launched Hitwise US
  • Awarded Telstra Small Business of the Year Finalist
  • Adrian Giles named Ernst & Young, Entrepreneur of the Year Finalist
  • Grew Sample size to 25M Internet users and 500,000 websites measured
  • Launched Hitwise Search Intelligence
  • Launched Hitwise Lifestyle
  • Established strategic partnerships with Claritas and Experian
2004
  • Telstra Small Business of the Year Finalists
  • Awarded 6 fastest growing technology company by Deloittes
  • American Business Award Finalist
2005
  • Named Victorian Export Awards Finalists
  • Launched Keyword Intelligence service
2006
  • Awarded Deloitte & Touche Technology Fast 50 - New York, 2006
  • Launched Hitwise Conversions Technology
  • Grew database to 800,000 websites measured
  • Purchased HitDynamics marketing management platform
2007
  • Grew database to 1 million websites measured
  • Announcement of Experian's acquisition of Hitwise
  • Launched Hitwise Dashboards interface
2008
  • 1500 client worldwide
  • Completed acquisition and integration of Experian
  • Publication of Click
  • Launched new Hitwise Search Intelligence
  • Ranked 37th on the Honomichi list of the top 50 US Market Research Firms
2009
  • Launched Hitwise Canada
  • Launched Hitwise Brazil


    Friday, September 24, 2010

    Interviewing techniques

    My wife is pregnant, she is expected to deliver the baby sometimes on February next year. 

    I believe it's best for my wife to deliver the baby in Australia. I had to sponsor my partner to Australia. The application is done. I think she will be here late next month.  

    I came back to Melbourne early this month. Now, I have to look for a new job to support my new family. All my families and friends warned me that getting a job these days is very tough. Recruitment agencies and companies are getting hundred if not thousand of emails everyday. Well, I have to work harder if I want to land a good job. 

    My quest start from here!

    In order to land a job, I need to learn 3 skills. 
    1. Writing the resume
    2. Writing the cover letter
    3. Answer interview questions
    Hence, I have to read 3 books during the last 2 weeks:
    1. The Quick Resume & Cover Letter Book
    2. 201 Killer Cover Letters
    3. Interview Skills That Win The Job
    I also read other books roughly, but all of them teaching similar concepts. 

    On this blog entry, I want to focus on interview techniques as I will get an interview very soon. I want to remind myself that cover letter and resume only lead to the interview. In order to win the job. I have to do well in the interview. I might be the best technical person, but I might not be able to secure the job.

    Interview is one of the hardest stage for me as I am one of a few people who suffer from impostor syndrome. This is why I am writing this entry to help me overcome it.

    Here are some of the tips I got from the books:

    Myths
    1. Prepare for the interview regardless of your experience. You may not be able to convoy this message at an interview.
    2. There is no right or wrong answer. Justify your statement is important.
    3. Experienced interviewers let you do most of the talk whilst inexperienced interviewers usually unprepared and keeps their phone ringing during the interview.
    4. If you have to say I don't know, say it! I think honesty is the best policy.
    5. Dress neatly and be friendly.
    6. Good answer is important, but it might not give you the job. Interviews are about rapport and trust. You should be a nice person to work with.
    7. There is no perfect answer because we don't know what the interviewer wants to hear. Keep it simple! Don't go around in circle trying to cover all possibilities.
    8. If you have no relevant question at the end of the interview, don't ask! 
    9. Just relax and be yourself. That doesn't mean you can lean back or making jokes.
    10. Interviewers are not looking for flaws. If you think that way, you cannot establish rapport and trust. Treat each question as an opportunity to excel yourself.
    Convincing them you're right for the job
    1. Common mistakes
      • Failing to express oneself clearly - simple language is the most effective. Avoid jargons or complex sentences.
      • Not being aware of one's body language - eye contact, sitting position and facial expression are important. 
      • Failing to control those nerves - feeling anxious before and during the interview is common. However, try to avoid it.
      • Trying too hard to please the interviewer - building rapport and trust during the interview is critical. However, very few interviewers appreciate interviewee going overboard.
    2. There is nothing wrong with you, everyone should commit some of the mistakes above in the interview. Try not to repeat your mistakes.
    3. Correct preparation, even if you are the only candidate preparing before hand would likely to give you a higher salary.
    4. The case for preparation
      • Interviews are rare events
      • Many people find it hard to sell themselves. I am included.
      • In most interviews, coming second isn't good enough. You need to beat other people.
    5. What is incorrect preparation
      • Rote-learning generic questions.
      • Learn other people responses by heart.
    6. Advantages for preparation
      • Improve confidence
      • Answer question succinctly 
      • Help you know what to say and how to say it
      • Avoid making negative impression
      • Import rapport-building skills
    7. Things that are important to interviewers - narrow down to 3 generic questions:
      • Can you do the job? They need to know your knowledge, experience, skills.
        What you have done?
        How you did it?
        Results...
      • Are you the sort of person they can work with? 
        Will you fit in the organization?
        Can you work with someone you don't like?
      • How motivated are you?
        You may not be asked this question, but failing to address it will risk you the job
      • Practice - success is one part talent and nine parts perseverance
      • Practicing your answers aloud. I got this from the book, I find it very interesting:
        It is important to practice your answers aloud, rather than just mentally rehearsing them. That’s because the human brain distinguishes between talking and thinking and you need to stimulate the talking part of your brain. Thinking your answers at an interview will get you nowhere, unless the interviewer is a mind reader.
      • Get some feedback - if you are not the winning candidate ask for feedback. Most interviewers will ignore you, but if you get the feedback, you can improve your future interview performance.
      • Mock interviews - setup mock interview with your friend will help measure your performance. It's a good idea if your friends had their own questions that would surprise you. However, you should prepare a list of questions to make it easier for them.
    8. Perseverance - Quitters usually get nowhere. Believe in yourself!
    9. Suggested activity: Neurolinguistic programming - This program help you perform better in the interview:
      • Close your eyes and imagine yourself performing extremely well in an interview. Capture the moment,  sound, smell, temperature, and so on. Don't hold back! Just relax and let it flow. 
      • Repeat the exercise until you capture the feeling of excitement. Picture yourself on the job after the interview. 
      • Every time you feel like quiting or thinking it too hard. Replay the excitement moment you've captured before. 
    To be continue!

    Wednesday, September 22, 2010

    Las Vegas - NABSHOW 2010

    Early April 2010, I flew all the way from Vietnam with my younger brother to America for the NAB show in Las Vegas. I must admit it was the biggest show I ever seen. In fact, it's the largest media conference in the world.

    There were 3 gigantic buildings. Each building took us one whole day to wondering around. All the big players were there:
    • Google
    • Yahoo
    • Microsoft
    • Adobe
    • Alkamine
    • Sony
    • Panasonic
    • Canon
    • Apple
    • ...
    From the NAB show, I learned that current market is about:
    • 3D TV
    • HD TV
    • Broadcasting/Content Delivery
    • Encoding
    • Workflow
    • Handheld device
    However, my unforgettable moment is not the NAB show. It was the 7.2 Magnitude Earthquake while I was in California. Initially, I was on the 4th floor at Huntington Beach Hotel. I want to get a better view so I moved to level 6th. At about 3:40PM. The hotel started to shake. I almost fell off my bed. That was the biggest earthquake I ever encountered.  

    That's my brother Cong and the VNN press. We were on the top level of the RIO building.
    We met a number of executives here including
    Tony, the former PlayBoy CTO,
    Khuong Nguyen, Deputy president of VTC, one of the largest multimedia corporation in Vietnam,
    and a number of other executes which I cannot recall their names.
    Some of them flew to Las Vegas using their private JET.
    I couldn't believe that they paid $US16,000 per night for this wing.
    That's me at the NAB. We were looking at the IO Drive. A SSD hard drive that can do up to 238,000 IOPS. This is very good for database application.
    This is our data center in the heart of Los Angeles. We should have ran the cable properly. Too bad, I usually thousands of miles from data center. I can't do anything about it. 

    Saturday, September 18, 2010

    Fundamental Concepts in Object Oriented Programming

    I never thought of this before reading Andrew Stuart blog. However, it's good for me to rehearse it before my university knowledge getting rusty. I work with PHP most of the time, so OO is not being utilized much. Let's see how I go.
    1. class, object (and the difference between the two)
      Class is a definition or blueprint of the object type.
      Object is created from a class. Object's state and behavior usually undergo significant change during the execution of the program.
    2. instantiation
      The process of creating the object.
    3. method (as opposed to, say, a C function)
      Method must be a member of a class whilst function can have independent existence. I think this only apply to Java. I never heard of a method in C/C++ or PHP.
    4. virtual method, pure virtual method
      Wow, I must admit that I could not remember this one. I must have been working with PHP and servers for so long. Anyway, a virtual method is a method whose behavior can be overridden within an inheriting class by a method with the same name and signature. If I remember correctly, this process is called method overriding.
      REF: http://en.wikipedia.org/wiki/Virtual_function
    5. class/static method
      A static method can be called without creating the object. This is very useful in math calculation. 
    6. static/class initializer
      I don't know. Will find out!
    7. constructor
      A special method that's being called at the creation of the object.
    8. destructor/finalizer
      Similar to constructor, destructor is called just before the object is destroyed.
    9. superclass or base class
      As the name implies, base class is the highest class in the hierarchy and does not inherit from any other class. 
    10. subclass or derived class
      Subclass is a sometimes called a derived class. It inherits some properties from its base class
    11. inheritance
      I think this is the most important feature of Object Oriented. It's the process in which a class inherits all the state and behavior from it parent class. Its parent class could further inherits from another class until the superclass is reached.
    12. encapsulation
      My lecturer Rob Allen usually said this whilst handling out the software project:
      If I see public variable, you fail. You have been warned! 
      This is exactly what encapsulation is all about. There should be no direct access to the data member.  
    13. multiple inheritance (and give an example)
      Most programming languages only support single inheritance. However, some programming languages like C++, Perl and Python do support multiple inheritance. An example would be:
       a mermaid could inherit from fish and human.
    14. delegation/forwarding
    15. composition/aggregation
      A way to combine simple objects or data types into a more complex objects. An example would be: A bicycle has wheels, gears, chains...
    16. abstract class
      Class that cannot be instantiated. A superclass is usually an abstract class.
    17. interface/protocol (and different from abstract class)
      Similar to class, but it only has a list of method names and method signatures. When a class implements an interface, it must define all methods listed in the interface.
    18. method overriding
      When subclass overrides a method defined in the base class. Remember that the method name and method signature must be the same.
    19. method overloading (and difference from overriding)
      More than one method with the same method name can be created within a class. However, the method signatures must be different. This is called method overloading.
    20. polymorphism (without resorting to examples)
      I've been struggling with this concept since University. I still don't understand much about polymorphism. Anyway, this is what I think: there are 2 basic type of polymorphism; static and dynamic.
      Static polymorphism allows programmer to create method with the same name but different method signature. This is method overloading.
      Dynamic polymorphism is where the child class overrides a superclass method.   
    21. is-a versus has-a relationships (with examples)
      Is a
      can be seen from inheritance while has a can seen from composition. An example would be:
      Man is a Human
      Man has a head
    22. method signatures (what's included in one)
      Method signature consisted of method name and parameters. E.g.
      withdraw(int amount)
      Note: return type are not considered to be as part of the method signature.
    23. method visibility (e.g. public/private/other)
      public - can be accessed by foreign class/object
      protected - can be accessed by inherited class/object
      private - can only be accessed locally within the class/object