How does IMPLEMENTATION Performance Compare ?
Usually, when someone creates benchmarks, they are trying to prove that their thing is faster than someone else's thing.
I’m PAID by Microsoft to write BOTH PHP and ASP.NET Code. I was doing PHP before .NET shipped. I love them both.
This makes it hard for me to say anything good about either one. When I confer a preference for something in PHP, my Microsoft peers send me flame mail and when I confer a preference for something in ASP.NET, my PHP friends come out of the woodwork to call me a Microsoft shill.
I started building and running these tests because everyone had opinions about comparative PHP performance (Windows versus Linux & 5.2 versus 5.3), but no one had any solid data.
So, I decided to collect some empirical evidence of my own.
Before you look at them, let m e provide some method details and context.
All tests were run on the SAME Machine.
A Toshiba Tecra M5 with 4 Gig of ram and a 60 Gig 7200 RPM Hard Drive.
Ubuntu 9 and Windows Server 2008 Standard were natively installed on 2 separate (but identical) hard drives.
The web servers were Apache2 on Linux and IIS 7 on Windows.
Both operating systems were fully patched / updated.
No Operating System or Development Runtime performance enhancements were added.
I wasn’t investigating how much speed an expert could custom tailor the tests to on a specific platform.
Yes, I could implement PHP Byte Caching, or for ASP.NET I could use Page Caching, Partial Page Caching, SQL Cache Dependency, Multi Threading, etc.
Both Windows and Linux Implementations of PHP will benefit from PHP Byte Code caching.
My goal was to determine the relative speed of THE IMPLEMENTATION.
I found the results both interesting and unexpected.
PHP on Linux Versus PHP on Windows…..
I really though one would just be faster than the other, but I was wrong. Some things are faster on Windows, other are faster on Linux.
- RAW statement execution seems faster on Windows.
- Function Calls were faster on Windows
- Object Creation / Access was faster on Linux with PHP 5.2 but faster on Windows with 5.3
- Library calls were faster on Linux. (Example: Encryption 3-5 times faster on Ubuntu.)
- File Access is faster on Linux by a small percentage, except for file copy operations which was as much as 60% slower on Windows probably due to the ACL advanced security.
- MySQL access with Linux is faster by more than a little and on Windows, MySQL access deteriorates in version 5.3 (This seems to be poor implementation, see PostgreSQL below.)
- PostgreSQL performance is very close on both platforms (within 6/100 of a second for 1000 Operations) – It’s faster on Windows and faster still on Windows with PHP 5.3
- MS SQL Server access from PHP 5.2 on Windows is marginally slower than MySQL access on Linux. (PHP 5.3 not yet supported at the time of this writing.)
So what does all that mean ?
- We can probably say that in terms of raw execution – performance on Linux versus Windows is probably a wash (more or less equivalent) so that the performance of PHP itself becomes a moot factor in choosing Linux or Windows for PHP application deployment.
- If you are building an application, or running an application that supports it, PostgreSQL might be a better database choice since it performs pretty much the same on Windows and Linux.
- If you are running an application that locks you in to Sun Microsystems’ MySQL and you want to run it on Windows, your should do scale planning. (My personal guess is that it’s unlikely that Sun will markedly improve MySQL performance on Windows. )
- Version 1 of the PHP Driver for SQL Server (V2 is in the works) is somewhat slower than MySQL or PostpreSQL but probably not enough to discourage use where diverse developer access is desired. (v2 ot the driver will improve performance. )
By and large I think the PHP team and the Microsoft IIS team have accomplished good raw performance equivalence across platforms. (Now we just need to get the Open Source Application teams (Drupal, WordPress, Joomle, etc.) to do performance optimization on both !)
PHP versus ASP.NET Raw Performance …..
By now you have cheated and looked at the spread sheet.
Yes, ASP.NET is universally faster than PHP (on Windows and on Linux) with the exceptions of File Copy and Attribute operations.
MySQL Access from PHP on Linux is a TINY bit faster than SQL Server access on Windows (assuming common data types and SELECT statements) but probably not enough to matter.
ASP.NET (C#) operations, object use, library calls, etc. are SIGNIFICANTLY faster that the PHP equivalents.
I know my PHP friends and the Linux dudes (and dude-etts) will probably come out of the wood work to refute my tests and results :)
I’ve always thought that if high end performance options were part of your needs requirements, then .NET programming has some advanced options “out of the box” like multi-threading, asynchronous requests, and a number of caching options.
NOTE – I’m not saying “ASP.NET is Faster so you shouldn't choose PHP !!!! I’ve always contended that the affable simplicity of PHP had some drawbacks for certain advanced applications. (Just as the early learning complexity of ASP.NET can have it’s drawbacks. )
To me (your mileage may vary) the exciting thing about PHP is not the language / platform so much as it is what thousands of clever PHP Developers have done with it (Drupal, Joomla, Wordpress, PHPBB, Nuke, etc.)
In any event, it’s nice to now have some data that PHP performance on Windows and Linux are “in the same ballpark”.
Now I can start writing those Windows specific PHP libraries I’ve been dreaming about for years !!
COMMENT WARNING
- I know some will be incensed by these tests. You are welcome to comment and disagree, but if you can't be polite I’ll simply delete your comments and block your IP address.
- If you dislike the results and want to refute them – DO THE WORK. Accompany your dissent with DATA. Take my code or write your own and argue with FACTS.
Posted in: General asp.net | Tags: asp.net php windows linux implementation performance compare windows versus linux sql server postgresql ms sql server mysql
- Write a simple Windows Forms MessageBox statement.
System.Windows.Forms.MessageBox.Show
("Hello, Windows Forms");
- Can you write a class without specifying namespace? Which namespace does it belong to by default??
Yes, you can, then the class belongs to global namespace which has no name. For commercial products, naturally, you wouldn’t want global namespace.
- You are designing a GUI application with a window and several widgets on it. The user then resizes the app window and sees a lot of grey space, while the widgets stay in place. What’s the problem?
One should use anchoring for correct resizing. Otherwise the default property of a widget on a form is top-left, so it stays at the same location when resized.
- How can you save the desired properties of Windows Forms application?
.config files in .NET are supported through the API to allow storing and retrieving information. They are nothing more than simple XML files, sort of like what .ini files were before for Win32 apps.
- So how do you retrieve the customized properties of a .NET application from XML .config file?
Initialize an instance of AppSettingsReader class. Call the GetValue method of AppSettingsReader class, passing in the name of the property and the type expected. Assign the result to the appropriate variable.
- Can you automate this process?
In Visual Studio yes, use Dynamic Properties for automatic .config creation, storage and retrieval.
- My progress bar freezes up and dialog window shows blank, when an intensive background process takes over.
Yes, you should’ve multi-threaded your GUI, with taskbar and main form being one thread, and the background process being the other.
- What’s the safest way to deploy a Windows Forms app?
Web deployment: the user always downloads the latest version of the code; the program runs within security sandbox, properly written app will not require additional security privileges.
- Why is it not a good idea to insert code into InitializeComponent method when working with Visual Studio?
The designer will likely throw it away; most of the code inside InitializeComponent is auto-generated.
- What’s the difference between WindowsDefaultLocation and WindowsDefaultBounds? WindowsDefaultLocation tells the form to start up at a location selected by OS, but with internally specified size. WindowsDefaultBounds delegates both size and starting position choices to the OS.
- What’s the difference between Move and LocationChanged? Resize and SizeChanged?
Both methods do the same, Move and Resize are the names adopted from VB to ease migration to C#.
- How would you create a non-rectangular window, let’s say an ellipse?
Create a rectangular form, set the TransparencyKey property to the same value as BackColor, which will effectively make the background of the form transparent. Then set the FormBorderStyle to FormBorderStyle.None, which will remove the contour and contents of the form.
- How do you create a separator in the Menu Designer?
A hyphen ‘-’ would do it. Also, an ampersand ‘&\’ would underline the next letter.
- How’s anchoring different from docking?
Anchoring treats the component as having the absolute size and adjusts its location relative to the parent form. Docking treats the component location as absolute and disregards the component size. So if a status bar must always be at the bottom no matter what, use docking. If a button should be on the top right, but change its position with the form being resized, use anchoring.
Simple Questions:
- What is a static class?
- What is static member?
- What is static function?
- What is static constructor?
- How can we inherit a static variable?
- How can we inherit a static member?
- Can we use a static function with a non-static variable?
- How can we access static variable?
- Why main function is static?
- How will you load dynamic assembly? How will create assesblies at run time?
- What is Reflection?
- If I have more than one version of one assemblies, then how will I use old version (how/where to specify version number?) in my application?
- How do you create threading in.NET? What is the namespace for that?
- What do you mean by Serialize and MarshalByRef?
- What is the difference between Array and LinkedList?
- What is Asynchronous call and how it can be implemented using delegates?
- How to create events for a control? What is custom events? How to create it?
- If you want to write your own dot net language, what steps you will you take care?
- Describe the diffeerence between inline and code behind - which is best in a loosely coupled solution?
- How dot net compiled code will become platform independent?
- Without modifying source code if we compile again, will it be generated MSIL again?
- How does you handle this COM components developed in other programming languages in.NET?
- How CCW (Com Callable Wrapper) and RCW (Runtime Callable Wrappers) works?
- What are the new thee features of COM+ services, which are not there in COM (MTS)?
- What are the differences between COM architecture and.NET architecture?
- Can we copy a COM dll to GAC folder?
- What is Shared and Repeatable Inheritance?
- Can you explain what inheritance is and an example of when you might use it?
- How can you write a class to restrict that only one object of this class can be created (Singleton class)?
- What are virtual destructures?
- What is close method? How its different from Finalize and Dispose?
- What is Boxing and UnBoxing?
- What is check/uncheck?
- What is the use of base keyword? Tell me a practical example for base keyword’s usage?
- What are the different.NET tools which you used in projects?
- What will do to avoid prior case?
- What happens when you try to update data in a dataset in.NET while the record is already deleted in SQL Server as backend?
- What is concurrency? How will you avoid concurrency when dealing with dataset?
- One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid this problem?
- How do you merge two datasets into the third dataset in a simple manner?
- If you are executing these statements in commandObject. “Select * from Table1; Select * from Table2″ How you will deal result set?
- How do you sort a dataset.
- If a dataset contains 100 rows, how to fetch rows between 5 and 15 only?
- What is the use of Parameter object?
- How to generateXML from a dataset and vice versa?
- How do you implement locking concept for dataset?
- How will you do Redo and Undo in TextBox control?
- How to implement DataGrid in.NET? How would you make a combo-box appear in one column of a DataGrid? What are the ways to show data grid inside a data grid for a master details type of tables? If we write any code for DataGrid methods. what is the access specifier used for that methods in the code behind file and why?
- How can we create Tree control in asp.NET?
- Write a program in C# to find the angle between the hours and minutes in a clock?
- Write a program to create a user control with name and surname as data members and login as method and also the code to call it.
- How can you read 3rd line from a text file?
- Explain the code behind wors and contrast that using the inline style.
- Explain different types of HTML, Web and server controls.
- What are the differences between user control and server control?
- How server form post-back works?
- Can the action attribute of a server-side
- How would ASP and ASP.NET apps run at the same time on the same server?
- What are good ADO.NET object to replace to ADO Recordset object.
- Explain the differences between Server-side code and Client-side code.
- What type of code(server or client) is found in a Code-Behind class?
- Should validation (did the user enter a real date) occur server-side or client-side? Why?
- What does the “EnableViewState” property do? Why would I want it on or off?
- What is the difference between Server.Transfer and response.Redirect? Why?
- Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced.NET component?
- Let’s say I have an existing application written using VB6 and this application utilizes Windows 2000 COM+ transaction services. How would you approach migrating this application to.NET?
- If I am developing an application that must accomodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing). What would be the best approach to maintain login-in state for the users?
- What are ASP.NET web forms? How is this technology different than what is available though ASP(1.0-3.0)?
- How does VB.NET achieve polymorphism?
- How does C# achieve polymorphism?
- Can you explain what is Inheritance and an example in VB.NET and C# of when you might use it?
- Describe difference between inline and code-behind?
- What is loosely coupled solution in.NET?
- What is diffgram?
- Where would you use an iHTTPModule and what are the limitations of any approach you might take in implementing one?
- What are the Advantages and DisAdvantages of viewstate?
- Describe session handling in a webform, how does it work and what are the limitations?
- How would you get ASP.NET running in Apache web servers? Explain it’s limitations.
- What is MSIL and why should my developers need an appreciation of it if at all?
- Which methos do you invoke on the DataAdapter control to load your generated dataset with data?
- Can you edit data in Repeater control? How?
- Which template must you provide, in order to display data in a Repeater control?
- How can you provide an alternating color scheme in a Repeater control?
- What property must you set, and what method must you call in your code, in order to bind the data from some data source to the repeater control?
- What base class do all web forms inherit from?
- What method do you use to explicitly kill a user’s session? How?
- How do you turn off cookies for one page in your site? Give an example.
- Which two properties are on every validation control?
- What tags do you need to add within the asp:datagrid tags to bind columns manually? Give an example.
- How do you create a permanent cookie?
- What tag do you use to add a hyperlink column to the dataGrid?
- What is the standard you use to wrap up a call to a Web Service?
- Which method do you use to redirect the user to another page without performing a round trip to the client? How?
- What is the transport protocol you use to call a Seb Service SOAP?
- What does WSDL stand for?
- What property do you have to set to tell the grid which page to go to when using the Pager object?
- Where on the Internet would you look for Web Services?
- What tags do you need to add within the asp:datagrid tags to bind columns manually? How?
- Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
- How is a property designated as read-only?
- Which control would you use if you needed to make sure the values in two different controls matched?
Posted in: Interview Questions General | Tags: interview questions and answers questions interview answers q&a .net c# c sharp xml winform rectangular window menu designer docking anchor dock deploy specify namespace config
Technical / Tactics
Every SEO prefers certain tactics over others, but familiarity with many could indicate a deeper understanding of the industry. And while every SEO doesn't need to have a web developer background, having such skills can help set someone apart from the crowd.
- Give me a description of your general SEO experience.
- Can you write HTML code by hand?
- Could you briefly explain the PageRank algorithm?
- How you created any SEO tools either from scratch or pieced together from others?
- What do you think of PageRank?
- What do you think of using XML sitemaps?
- What are your thoughts on the direction of Web 2.0 technologies with regards to SEO?
- What SEO tools do you regularly use?
- Under what circumstances would you look to exclude pages from search engines using robots.txt vs meta robots tag?
- What areas do you think are currently the most important in organically ranking a site?
- Do you have experience in copywriting and can you provide some writing samples?
- Have you ever had something you've written reach the front-page of Digg? Sphinn? Or be Stumbled?
- Explain to me what META tags matter in today's world.
- Explain various steps that you would take to optimize a website?
- If the company whose site you've been working for has decided to move all of its content to a new domain, what steps would you take?
- Rate from 1 to 10, tell me the most important "on page" elements
- Review the code of past clients/company websites where SEO was performed.
- What do you think about link buying?
- What is Latent Semantic Analysis (LSI Indexing)?
- What is Phrase Based Indexing and Retrieval and what roles does it play?
- What is the difference between SEO and SEM?
- What kind of strategies do you normally implement for back links?
- What role does social media play in an SEO strategy?
- What things wouldn't you to do increase rankings because the risk of penalty is too high?
- What's the difference between PageRank and Toolbar PageRank?
- Why might you want to use nofollow on an internal link?
Analysis
A big part of SEO involves assessing the effectiveness of a campaign both relative to past performance as well as to competing sites.
- Are you familiar with web analytics and what packages are your familiar with?
- From an analytics perspective, what is different between a user from organic search results vs. a type-in user?
- How do you distinguish the results of your search optimization work from a seasonal change in traffic patterns?
- How do you evaluate whether an SEO campaign is working?
- What does competitive analysis mean to you and what techniques do you use?
- If you've done 6 months of SEO for a site and yet there haven't been any improvements, how would you go about diagnosing the problem?
- How many target keywords should a site have?
- How do *you* help a customer decide how to their budget between organic SEO and pay-per-click SEM?
- You hear a rumor that Google is weighting the HTML LAYER tag very heavily in ranking the relevance of its results – how does this affect your work?
- Why does Google rank Wikipedia for so many topics?
Industry Involvement
Is SEO just a job to pay the bills? Nothing wrong with that, but some senior positions can benefit from more enthusiasm and interest that can be measured by work done outside of the office.
- If salary and location were not an issue, who would you work for?
- In Google Lore – what are 'Hilltop', 'Florida' and 'Big Daddy'?
- Have you attended any search related conferences?
- Google search on this candidates name, (if you cannot find them, that's a red flag).
- Do you currently do SEO on your own sites? Do you operate any blogs? Do you currently do any freelance work and do you plan on continuing it?
- Of the well-known SEOs, who are you not likely to pay attention to?
- What are some challenges facing the SEO industry?
- What industry sites, blogs, and forums do you regularly read?
- Who are the two key people – who started Google?
- Who is Matt Cutts?
- If you were bidding on a contract, what competitor would you most worry about?
Open-Ended
These questions are more about how an answer is given rather than the actual answer. They often scare interviewees, but with no wrong answer they're actually a good opportunity to shine.
- Tell me your biggest failure in an SEO project
- What areas of SEO do you most enjoy?
- In what areas of SEO are you strongest?
- In what areas of SEO are you weakest?
- How do you handle a client who does not implement your SEO recommendations?
- Can you get "xyz"? company listed for the keyword "Google"? in the first page?
- What do you think is different about working for an SEO agency vs. doing SEO in-house?
- Why are you moving from your current position and/or leaving any current projects?
Posted in: Interview Questions General | Tags: interview questions and answers interview meta seo pagerank algorithm pr digg sphinn meta tags optimize seo tools nofollow analysis google rank wikipedia seos open-ended
In grade school a common technique for winning an argument was to declare that you were smarter and therefore you were right. Yeah, it wasn't a particularly profound way to win people over, but hey you can't expect all that much from a grade schooler during a 15 minute recess. Unfortunately, it seems that some people didn't quite move on from that style and make frequent use of I have a degree and therefore I'm right. This is silly.
Now I don't want to get into pointing fingers, because that would be unprofessional. Errr… that's a lie. I really do want to name names because deep down inside there's still a little grade schooler in me too. But I'll resist and instead let you know that there's a hint somewhere on this page of who inspired this post. OK, poking fun of people aside, I'd like to examine whether a formal education in informational retrieval (IR) really does make you a better search engine optimizer. Why information retrieval? Because that's the topic name that these "I'm smarter than you people" most often use.
So what is information retrieval? Unlike search engine optimization which is as uninformative as phrases get, you can accurately infer the meaning of information retrieval.
"Information retrieval (IR) is the science of searching for information in documents, searching for documents themselves, searching for metadata which describe documents, or searching within databases, whether relational stand-alone databases or hypertextually-networked databases such as the World Wide Web."
– Wikipedia
Don't be fooled by that overly simplistic definition. The human brain makes us incredibly effective at information gathering and delivery, but trying to automate what our brains do is incredibly complex. This is why Google hires so many PhD's.
So effective information retrieval is difficult; the theory behind it is complex; and the amount of research is large. Does any of that mean that you can't be a good SEO unless you've cracked open a textbook? Does a formal education in information retrieval even help you become a better SEO?
Before I answer those questions, let me give you my credentials. Or rather, let me tell you that I've never studied information retrieval. My background is in computer science. I've spent most of my career writing software or managing software projects. Without an information retrieval background, some people will undoubtedly say that I shouldn't write what I don't know about. Ha ha, that's a good one. Imagine how many fewer blogs there'd be if people only wrote about the areas they're experts in. I have an opinion, this is my blog, and so I'm sharing that opinion.
Do You NEED An Information Retrieval Background?
If people have an academic interest they should pursue that interest. Having said that, I don't believe SEO requires any particular background. I happen to have a technical background, but others have started from the marketing side. Still others don't have a web-related background at all with some getting into SEO accidentally. I even heard about a guy that started down the SEO road while in the hospital and not able to work due to injury.
I've worked with two people who take IR quite seriously. Both are smart and articulate, but only one actually impressed when it came to real-world SEO. A large number of non-IR-loving SEO's I've worked with are also smart and articulate. What's more, these other SEO's have demonstrated an ability to succeed at SEO whether for client sites or their own projects. How'd they do that without the right education? They're motivated to learn what they need to learn. SEO, like many web-related activities, has a low barrier of entry where hard-working, smart people can step in a do a good job without knowing the nitty-gritty details of building a search engine. Rather than focus on what goes into making a search engine, they focus on what comes out.
Does IR Help With SEO?
An IR background may give a beginner the upper hand. That is, if you take two people trying to do SEO for the first time you're probably better off listening to the one with the degree. That lead will only last for so long. I quickly found out that my computer science degree gave me a leg up in the interview process and with learning new things quickly, but I eventually started to bump into people that could run circles around me who had completely unrelated backgrounds. That's just the nature of many things technology — the best education comes from keeping up with the latest news and trying new things.
Is There Any Benefit to Understanding IR?
The one area where I think having a solid grasp of IR would help is in understanding why a particular technique works or doesn't work. Some people really need to know why something works, while others are quite happy just to know what works. For example, I don't know how my car works (search engine), but I do know that pressing on the gas gives me the desired response (SEO). This situation is acceptable because I know I can go to a mechanic (Google engineers) when my car needs servicing. But no matter how good that mechanic is, he won't make me a better driver. It's still up to me to make sure I get to my destination successfully.
One problem with relying too much on an information retrieval education is that the search engines aren't going to avoid a technique that makes their results better just because it goes against theory. Google is known to make hand edits which are hardly algorithmic and knowing what's going to trigger a manual edit isn't going to come from a textbook.
So to all of you information retrieval experts out there, share your ideas (if you want to), but don't wave your degree in everyone else's face. It doesn't help your case and is likely to hurt it instead. Besides, my Computer Science degree is better than anything you've got. Oops… there's that grade schooler again 
Posted in: General | Tags: wikipedia seos retrieval degree schooler phds retrieval background ir
- Why did you choose your major?
- Describe a recent leadership experience.
- Which courses have you enjoyed the most? The least? Why?
- What is your GPA?
- If you could do so, how would you plan your education differently?
- Describe your most rewarding college experience. Your most challenging.
- Tell me about yourself.
- What do you consider to be your greatest strengths?
- If you could change one thing about yourself, what would it be?
- Describe a time you failed at something and how you handled it?
- What three keywords would your peers use to describe you, and why?
- Give me an example of something complex that you needed to effectively communicate to others. What made it complex? Why was it difficult to communicate?
- Tell me about an important goal that you set in the past. Were you successful? Why?
- Tell me about a situation where you had to speak up (be assertive) in order to put across a point that was important to you.
- Describe the most significant written document, report, or presentation, you have completed.
- Tell me about something you have done that is very creative.
- Describe a time when you were faced with problems or stress that tested your coping skills. What did you do?
- What motivated you to apply for this position?
- What interests you most about this job? Least?
- Why do you want to work for our company?
- What do you know about our company?
- What two or three things are most important to you in your job?
- If you were hiring a graduate for this position, what successful characteristics would you look for in a candidate?
- Describe three key skills or qualities you would bring to this position.
- Why should we hire you?
- Describe your job-related skills and experience, and how they relate to this position.
- What have you learned most from some of the jobs you have held?
- What did you enjoy most about your last job? Least?
- How would a former supervisor or professor describe you and your work?
- Describe a workplace challenge you faced and how you handled it.
- Tell me about a time you worked on a team. How did you handle it?
- Describe an experience involving a deadline. How were you able to finish on time?
- Describe a time you went above and beyond the call of duty to get a job done.
- Give me an example of your ability to lead others.
- Tell me about a time you wish you had done more planning. What did you learn?
- What are your short-range career goals?
- What are your long-range career goals? How are you preparing yourself to achieve them?
- What characteristics do you possess that will make you successful in your career?
- Who, or what, influenced you most with regard to your career objectives?
Posted in: Interview Questions General | Tags: netapp gpa leadership assertive job company objective preparing challenge job-related skill