Camel Case for Two Letter Acronyms

Posted: February 15, 2012 in ColdFusion

Here’s another “for later reference”…

Microsoft’s rules for .NET Framework 1.1 Abbreviations consist of:

  • Do not use abbreviations or contractions as parts of identifier names. For example, use GetWindow instead of GetWin.
  • Do not use acronyms that are not generally accepted in the computing field.
  • Where appropriate, use well-known acronyms to replace lengthy phrase names. For example, use UI for User Interface and OLAP for On-line Analytical Processing.
  • When using acronyms, use Pascal case or camel case for acronyms more than two characters long. For example, use HtmlButton or htmlButton. However, you should capitalize acronyms that consist of only two characters, such as System.IO instead of System.Io.
  • Do not use abbreviations in identifiers or parameter names. If you must use abbreviations, use camel case for abbreviations that consist of more than two characters, even if this contradicts the standard abbreviation of the word.

These appear to be good guidelines to follow for ColdFusion as well. I was going after casing for two letter acronyms in this case.

REF: http://msdn.microsoft.com/en-us/library/141e06ef(v=vs.71).aspx

This is pretty much a “note to self”… but in ColdFusion 9.01 you can now loop over arrays using the  for – in loop while in cfscript.

Syntax is:

 for(item in array) {
doSomething(item);
}

I have ColdFusion 9 Developer Edition installed on my Windows 7 machine running IIS7. Normally my ColdFusion 9 Application Server service starts automatically for me.

Recently I have started learning and developing with ORM. Because of this, I need to figure out what ORM is asking the SQL server to make sure it’s not doing anything crazy.

To do this I turned on logsql in ormSettings config in application.cfc. Then found that it would log to a file or the Console view.

But alas, nothing showed in my Console view, and yep, I did have a server configured in the Servers view.

So I find out that I need to stop/start the server in the servers view to get this working. After trying that it pretty much lied to me and said it did when it really didn’t.

At that point I stopped the service in the Windows service and tried to start from ColdFusion Builder. No such luck.

Then I tried restarting ColdFusion Builder w/ Administrator rights. BAM – now I can get the CF service started.

But I notice something interesting. The service in the Windows Service Manager still shows stopped after a refresh. But alas my Console works perfectly.

So I have no idea what is going on, but this is what I figure needs to happen to get this all working correctly:

  1. Change the ColdFusion 9 Application Server properties of startup type to manual and stop the service.
  2. Close ColdFusion Builder if already open and start it as Administrator (right click icon and select Run As Administrator)
  3. In the Servers View in ColdFusion Builder, edit your server config and auto start and stop the CF Server. (optional but recommended… If you close CF Builder, you will need to restart the server anyway)
  4. Select your server and click the green run arrow.
  5. You should see ColdFusion startup with a bunch of output in the Console at this point.
At this point I would suggest modifying your shortcut to always run as administrator. This has gotten me many times already, so I finally made this change.
  1. Right click shortcut and select properties
  2. Click Advanced button
  3. Turn on “Run as administrator”
  4. OK > OK

What a mess! Needs to be a slicker way of getting this rolling without an hour of research and messing with Administrator rights. But hope this helps my memory and anyone else scratching their head!

“Stuff” Silicon Valley Says

Posted: January 25, 2012 in Uncategorized

Just had to post this …

Stop PROTECT IP / SOPA

Posted: January 17, 2012 in Uncategorized
Tags: ,

Tomorrow many sites like Wikipedia, MoveOn, Reddit, BoingBoing, Mozilla, WordPress, TwitPic and the ICanHasCheezBurger network will be going dark for a day to protest SOPA and PIPA.

If you don’t know what this all means, “Fight For The Future” says it well:

“PROTECT-IP is a bill that has been introduced in the Senate and the House and is moving quickly through Congress. It gives the government and corporations the ability to censor the net, in the name of protecting “creativity”. The law would let the government or corporations censor entire sites– they just have to convince a judge that the site is “dedicated to copyright infringement.”

The government has already wrongly shut down sites without any recourse to the site owner. Under this bill, sharing a video with anything copyrighted in it, or what sites like Youtube and Twitter do, would be considered illegal behavior according to this bill.

According to the Congressional Budget Office, this bill would cost us $47 million tax dollars a year — that’s for a fix that won’t work, disrupts the internet, stifles innovation, shuts out diverse voices, and censors the internet. This bill is bad for creativity and does not protect your rights.”

Check out this video to get a better understanding:

Learning to type during grade-school and high-school, it was usually taught to place two spaces after each sentence. They never explained why other than “that’s how it’s done”. Which is one fact I always hated about school. They always said this is what it is but rarely ever why.

Here’s the why: Manual typewriters used what is called “monospaced type”. Every character occupied an equal amount of horizontal space. This “type” created a lot of white space in between characters which made it difficult to spot the spaces between sentences quickly. Thus two spaces made text easier to read.

But then came the electric typewriters in the 1970′s. These new found pieces of technology started using proportional fonts instead of monospaced fonts. The computer era also used proportional fonts both on the screen and the printer.

According to typographers, the double space is no longer needed.

So, not even being a thought in my parents head in 1970, why did schooling decide that double spacing was still needed some 15+ years later?

In the modern age of the web, it’s actually impossible to add more than one space between characters or objects without using a non-breaking space code. Now who’s going to do that and why?

If you are ever at the dinner table, smoking your pipe, and which to bring up a dull and boring subject; ask the attendees “single space or double space?”. And if you ever send me double spaced sentences, you’re just wasting my space, even though the APA Style Guide would disagree with me.

Phone Finger Heatmap

Posted: January 2, 2012 in Uncategorized

After reading an article today on making your iPhone more secure by adding a duplicate digit to your lock code, I though that perhaps I should look at my fingers’ tell-tale signs. The article describes how that someone could potentially look at your finger residue and determine which digits you use to unlock your phone, thus eliminating much of the guesswork to hack in.

While it appears I’m safe from this type of finger press detection, at least at this moment, I did find it interesting to find that I do leave tell-tale signs on how I most often interact with the phone.

The top section has mostly down-swipe strokes. This would be bringing down the notifications area.

The mid-top section is mostly untouched.

The mid-bottom section mostly consists of right-swipe strokes. This would probably be moving forward through news and social updates.

The bottom section consists individual presses. Most likely from using the virtual keyboard and app icons.

The search and back permanent buttons are the most used where as the home button is used a little and the menu button is rarely used.

I’d have to say most of these impressions came from my right thumb. I wonder if there’s any long-term effects to my poor thumb leaving all its skin oil behind and all that dragging?

Anyway, this natural heat-map methodology is kind of gross. Time to clean the screen.