Based on available information, I believe that Software Engineering is already a formal profession. It may not be widely accepted as such, but it is meeting the generally accepted criteria for the characteristics of a profession.
From Wikipedia's article on Profession:
There is considerable agreement about defining the characteristic
features of a profession. They have a "professional association,
cognitive base, institutionalized training, licensing, work autonomy,
colleague control... (and) code of ethics,"[18] to which Larson then
also adds, "high standards of professional and intellectual
excellence," (Larson, p. 221) that "professions are occupations with
special power and prestige," (Larson, p.x) and that they comprise "an
exclusive elite group," (Larson, p. 20) in all societies.
This quotes Magali Sarfatti Larson's The Rise of Professionalism: A Sociological Analysis extensively. Searching for "characteristics of a profession" tend to lead similar results.
How does Software Engineering stack up against these characteristics?
Professional Association There are numerous professional associations for software engineers. The IEEE and more specifically the IEEE Computer Society serve professionals working in engineering around the world, with the IEEE Computer Society focusing specifically on computer and software engineers. The ACM is another professional organization for professionals working in computing, generally in the Americas. There's also the British Computer Society, which caters to various aspects of professions in information and communication technology, generally in the UK.
Cognitive Base The Software Engineering Body of Knowledge is sponsored by the IEEE, Boeing, National Research Council Canada, Raytheon, Construx Software, Canadian Council of Professional Engineers, the MITRE Corporation, NIST, Rational, SAP (for the 2004 version). It was started specifically as a step toward "making software engineering a legitimate engineering discipline and a recognized profession".
Institutionalized Training In the United States, Information Technology, Computer Science, and Software Engineering programs can be accredited by ABET. In Canada, Computer Science and Software Engineering programs are accredited by CIPS. These organizations define minimum standards and expected outcomes for students graduating from an accredited program to enable them to function in a professional environment. The IEEE also offers two exams based on the Software Engineering Body of Knowledge - the Certified Software Development Associate exam for undergraduates (or recently graduated undergraduates) and the Certified Software Development Professional exam for mid-career professionals.
Licensing As of April 2013, NCEES offers a Professional Engineering exam in Software Engineering. It is offered on a state-by-state basis in the United States. However, the Software Engineering PE exam is not currently offered by every state, and even fewer require the license. This article, published in the November/December 1999 issue of IEEE Software, discusses licensing requirements in the state of Texas and a brief discussion of licensing in Ontario and British Columbia, Canada and the UK. In Texas, a license is only required to work on the design, testing, or implementation of embedded or real-time systems that "require a detailed understanding of the engineered electrical or mechanical components" and for software systems for "mechanical devices, electrical devices, and power systems" - a relatively small amount of software development work. In states that offer licensing, the worst case scenario is disciplinary action, sanctions, or loss of your license should a client or employer file a complaint. However, the only real harm comes in states that require a license - unless the license is required to do the work, losing it doesn't mean anything.
Code of Ethics The ACM and IEEE Computer Society created a Software Engineering Code of Ethics and Professional Practice. In the United States, graduates of ABET accredited engineering programs, including Software Engineering programs, can also join the Order of the Engineer, which maintains a code of ethics that generally applies to professional engineers.
Work Autonomy, Colleague Control, High Standards of Professional and Intellectual Excellence These are frequently visible in an environment where software engineering is treated as an engineering discipline. That is to say that not all employers (or freelancers) treat software development as engineering.
Oleski's answer is incorrect. For SQL Server 2008, an IN
list gets refactored to a series of OR
statements. It may be different in say MySQL.
I'm fairly certain that if you generated actual execution plans for both your queries they would be identical.
In all likelihood the second query ran faster because you ran it second, and the first query had already pulled all the data pages from the database and paid the IO cost. The second query was able to read all the data from memory and execute a lot faster.
Update
The actual source of the variance is likely that the queries are not equivalent. You have two different OR
lists below:
WHERE PV.Adm_Date BETWEEN @SD AND @ED
AND SO.svc_cd = 'PCO_REMFOLEY'
OR SO.svc_cd = 'PCO_INSRTFOLEY'
OR SO.svc_cd = 'PCO_INSTFOLEY'
OR SO.svc_cd = 'PCO_URIMETER'
and later
WHERE OSM.ord_sts = 'DISCONTINUE'
AND SO.svc_cd = 'PCO_REMFOLEY'
OR SO.svc_cd = 'PCO_INSRTFOLEY'
OR SO.svc_cd = 'PCO_INSTFOLEY'
OR SO.svc_cd = 'PCO_URIMETER'
In both those WHERE
clauses, operator precendence (where AND is handled before OR) means that the actual logic run by the engine is:
WHERE (ConditionA AND ConditionB)
OR ConditionC
OR ConditionD
OR ConditionE
If you replace the OR
lists with an IN
expression, the logic will be:
WHERE ConditionA
AND (ConditionB OR ConditionC OR ConditionD OR ConditionE)
Which is radically different.
Best Answer
This way, the dates can easily be sorted as strings using the default sorting rules (i.e. lexicographical sorting).
This is also why both month and day are specified using two digits (adding a leading zero if needed).
In fact it is one of the date formats defined by ISO 8601. That standard also defines a date-and-time format,
2015-03-27T15:26:40Z
, which is also sortable as strings.However, YYYYMMDD has an added benefit of making it possible to easily (no substrings or character replacements involved) parse the string as an integer, and still use default ordering on integers.