semantic

Semantic value of span

The span element would seem to be exactly like a div, but at the in-line level rather than at the block level, however I can't seem to think of any beneficial logical divisions that the span element can provide. A single sentence, or word if not contained in a sentence, seems to be the smallest logical part. Ignoring CSS, since that will...

count vs length vs size in a collection

From using a number of programming languages and libraries I have noticed various terms used for the total number of elements in a collection. The most common seem to be length, count, and size. eg. array.length vector.size() collection.count Is there any preferred term to be used? Does it depend on what type of collection it is? ie...

Why are generics called generics?

At the risk of becoming the village idiot, can someone explain to me why generics are called generics? I understand their usage and benefits, but if the definition of generic is "general" and generic collections are type safe, then why isn't this a misnomer? For example, an ArrayList can hold anything that's an object: ArrayList myObj...

Does the use of the fieldset HTML tag have meaning beyond grouping forms?

Usually, I've seen it with forms, but I've found it helpful to group related sets of data (eg when you have multiple tables on a page, using a fieldset around each table or group of related tables to define a visible meaning and a group name (legend)). Is this abusing the fieldset tag to the point where, in my uses, it no longer has sema...

What is the best approach for creating a Common Information Model?

Hi, I would like to know the best approach to create a Common Information Model. Just to be clear, I've also heard it referred to as a canonical information model, semantic information model, and master data model - As far as I can tell, they are all referring to the same concept. I've heard in the past that a combined "top-down" and "...

What's the best website for learning HTML Semantically?

Where should I point someone to learn the basics of HTML/CSS? I personally got my start from HTMLGoodies way back in the day, but while I thank Ken Burns for getting me going, I'm loathed to send someone out to that site nowadays as I think it's dated. Obviously there are many sites out there that cumulatively contain all the informati...

Correct way to write lists

This is something I've pondered over for a while, as I've seen both used in practise. Method 1 <ol> <li>List item 1</li> <li>List item 2 <ol> <li>List item 3</li> </ol> </li> <li>List item 4</li> </ol> This seems semantically correct to me, since the sub-list is a sub-list of that list item...

How would you markup a building plan/map using semantic HTML?

The building (a museum) has 7 levels (+3 to -3), each divided into different rooms/areas. Hovering over an area will reveal a popup describing that area. I'm looking for some markup that will accurately represent the 7 levels and their areas. The plan should make sense and be 'navigable' without any CSS/JS. Edit: Some clarification, t...

Is it correct to nest HTML definition lists (<dl>)?

Is it semantically correct to nest definition lists, or should they simply be a 'flat list of name/value pairs'. The specs don't seem to forbid it. Further to this question. ...

Why is exactly once semantics infeasible?

In RPC semantics where Erlang has hope for the best, SUN RPC with at-least once and Java RMI with at-most-once but no one has exactly once semantics. Why does it seem infeasible to have exactly once semantics? For example if the client keeps resending a uniquely tagged request until a reply is received and a server keeps track of all...

Frameworks vs. SDKs

What is the difference between a framework and an SDK? Take, for example, the MS platform SDK and the .NET framework. Both have API's, both hide their inner workings, and both provide functionality that may not be quickly/easily accessible otherwise (in other words, they serve a real-world purpose). So what's the difference? Is it pr...

C# Switch with String.IsNullOrEmpty

Is it possible to have a switch in C# which checks if the value is null or empty not "" but String.Empty? I know i can do this: switch (text) { case null: case "": break; } Is there something better, because I don't want to ...

How to express the content referenced by the anchor tag

I'd like to express in an HTML document what kind of document is pointed by an anchor tag (<a>). For example, is it a list of dates, or a list of people, etc... All referenced documents will be Atom feeds, but the links will be displayed differently based on what the feed contains. I see 2 options : using the "rel" attribute : this at...

Semantic difference between "Find" and "Search" ?

When building an application, is there any meaningful difference between the idea of "Find" vs "Search" ? Do you think of them more or less as synonymous? I'm asking in terms of labeling for application UI as well as API design. ...

Who cares... as long as the result is ok?

I am a bit stunned by lots of reactions on questions that point out that developers care more about the resulting compiled bytes than about the meaning of their code. I tend to nit-pick about postfix/prefix increment, as I tend to nit-pick about using a boolean for an enumerated type with two values, and about proper function naming, an...

What exactly defines production?

Like almost anyone who's been programming for a while, I'm familiar with the term "production code" and have a vague sense of what it means. However, can someone offer a semi-rigorous definition, since it seems Wikipedia and Google can't? It seems like there are a lot of gray areas in what counts as production, such as internal tools t...

Semantics of char a[]

I recently embarrassed myself while explaining to a colleague why char a[100]; scanf("%s", &a); // notice a & in front of 'a' is very bad and that the slightly better way to do it is: char a[100]; scanf("%s", a); // notice no & in front of 'a' Ok. For everybody getting ready to tell me why scanf should not be used anyway for securi...

What is the difference between c++0x concepts and c# constraints?

C++0x introduces concepts, that let you define, basically, a type of a type. It specifies the properties required of a type. C# let you specify constraints of a generic with the "where" clause. Is there any semantic difference between them? Thank you. ...

Are there OO models to generate SQL?

I have been wondering whether there is any code out there that enables representing SQL in the form of some object tree that can be assembled, modified and then finally rendered to valid SQL? Off the top of my head it could look something like that... var stmnt = new Statement(); stmnt .AddMaster("Customer") .Show("Firstname, "Last...

Semantic HTML markup for FAQs

I want to build a questions and answers page. It is not a list, it is not tabular data and I am not sure if or how I should use <dl><dt><dd>. What is the best semantic way to build it and to format it with css? ...