The Sex and Cash Theory for Programmers

Window Panels in Visual Studio 2008 (Dang-it, stop it!)

10. April 2008 23:30 by scott in   //  Tags: , ,   //   Comments (17)

There is a small feature that is just wasting little seconds that add up! I started using Visual Studio 2008 and started to notice it as soon as I started making new projects.

So, what is my problem, well I will tell you. The windows in my Visual Studio keep closing when ‘the pin is not pushed’. Let’s say I want to put a bunch of new controls onto the ‘deck’ from the toolbox. I have to first ‘push the pin’ and then start moving them over to the deck. I can’t just keep the ‘pin un-pushed’ and drag over the items. It should at least stay open for a second or two, and if it gets a user action to grab another item or at least put the mouse inside the window it shouldn’t move away so fast.


I have even tried grabbing really fast when the window closes and I can barely even get my mouse inside the window before it closes. I know it sounds like it was built for the keyboard operator more, but sometimes I get controlling and want to use my mouse.

One more problem with the windows, if you open a CSS file via the Solution Explorer, the window stays open for eternity. I often find my self having to Alt + Tab or open another window before it closes. This is a design flaw that I have had to deal with for a little while.

Dear Scott Guthrie:

Since you have some sway at Microsoft, can you please put this on a future release or even something in the options that you can set? I would love to have the option to either close quickly or close after 2 seconds so it lets the user open multiple items in the window. Please help. How about releasing a quick fix? That would be awesome!

Respectfully a .NET guru.

Scott Pio

One more reason why GoDaddy is Awesome!

9. April 2008 00:13 by scott in   //  Tags: ,   //   Comments (7)

Today, I have a problem with my "Quotes of the Day" Widget by nyveldt. I received an error today with my BlogEngine.Net blog. I was at work and couldn’t get home to fix it and I didn’t want to lose my user base. So I went into GoDaddy and clicked on the File Manager tab.

I then tried to download the Web.config file from GoDaddy which didn't seem to work. I then checked mark the file and clicked Edit. GoDaddy actually pulled up the source code of the file. WOW! I was impressed. I changed the Debug Errors to Off so I can view the problem at work. I then went to the XML file it have a problem with and again, clicked edit and it opened the file right up. I changed the problems and it fixed right away. Wow. I was impressed that I could edit the files right on GoDaddy. That is one more reason I love GoDaddy. Thanks to the GoDaddy developers, I got my page right back up and running.

RSS Add-in for BlogEngine.Net that reminds readers to sign up to RSS

6. April 2008 23:08 by scott in   //  Tags: , ,   //   Comments (0)

I was reading along blog posts and saw a reminder at the bottom of the post to sign up to the RSS.  I debated with my self for a few seconds and decided against it because its just some ploy to get you to sign up.  Heh.  So I created my own ploy.  I created an extension that sits at the bottom of every post and reminds the user with the text you prescribe and the RSS link you prescribe.

It was something small that only took like an hour, but I think it will be a good constant reminder to readers that they can and should (hehe) sign up to the blog because they enjoyed your post.

So here it is.

Basically, you just drop it into the folder BlogEngine/App_Code/Extensions.  It is a nice little feature that you can see, I have already installed.

I currently have one glitch in the code that I can't figure out.  If you use another theme except for mine, you will end up with a space after the link for the RSS.  Why, well I have deduced that it is the little picture that sits next to links that shows it will open in a new window.  For some reason though, the picture doesn't actually show up.  Hmm.  So if you can fix this glitch, I will give you credit both in the Extension and this Blog.

Thanks Guys and Happy Blogging

kick it on

Building a Linq Query gives me a question.

3. April 2008 23:12 by scott in   //  Tags: , , ,   //   Comments (17)

So here I am building a new site that will estimate around 500,000 page views and 50,000 database transactions DAILY.  I am currently working on a simple query that selects ONE row[column] from a database and returns the value to the rest of the methods.  I have a simple thought or question I would like answered and thought this would be a place to bring it up.

Is the foreach loop required even if I know I will receive only 1 record back from the database?

That's it and to give you an example:

        CS_Code.DataContext db = new CS_Code.DataContext(SQLStatementsCS.ConnectionStringID());
        var query = from RN in db.Province
                    where RN.Name == Name
                    select RN.uid;

        int value;
        foreach (var uid in query)
        { value = uid; }

I think it is kind of pointless to create a foreach loop and use 3 lines of code to just get an ID out of the database. So let me know in the comments section if this is the only answer and I will point out the answer and give you a link back to a site of your choice.

Thanks guys and dolls.

kick it on

My Bill of Rights as a Programmer

2. April 2008 02:53 by Scott in   //  Tags: , ,   //   Comments (14)

I have seen many lists of requirements programmers wish to obtain before they start the job.  I am no different for my company.  I have my own requirements before I start a new job and I wish to create a dynamic list of my rights as a programmer.

  1. Every Programmer shall have a quiet working environment.
    • This is essential in order to think.  If the employer cannot provide a quiet working environment, see Bill of Rights #2.
  2. Every Programmer shall have the right to listen to music.
    • The essential need for a quiet working environment or to be able just throw on music to down out the background noise is essential.  We as programmers work on brain power so therefore we as programmers need to concentrate.
  3. Every Programmer shall have a fast PC.
    • Developers are required to run a lot of software that requires tons of memory and speed to get the job done faster.  The Fast PC only ensures that the programmer is able to research on the Internet while developing code and upgrading the database all at the same time while keeping up on the essential work email.
  4. Every Programmer has their choice of both Keyboard and Mouse.
    • The mouse and keyboard will only allow them to develop faster and become skilled at both shortcut keys and mouse techniques.
  5. Every Programmer shall have a fast Internet connection.
    • This is the mother of them all.  The ability to research faster is required for faster development.
  6. Every Programmer shall have two or more monitors.
    • The research done on having two monitors (here, here, here and here) far outweighs the time spent on only having one.  So even before I get offered a job, one of my first questions is will I have at least two monitors?
  7. Every Programmer shall have a high back comfortable chair.
    • This is another question I ask before going any farther with interviewing.  It not only makes the developer happier, but it helps with poster and is good for the body.
  8. Every programmer shall have access to the right tools.
    • Would you rather develop in FoxPro or Visual Studio?  Would you rather develop on Dreamweaver that Visual Studio for .net Development?  Would you rather use SQL management 2000 or use SQL Management 2005?  IT is a requirement that the company be up to date on software development.
  9. Every programmer shall have the right to have admin access on the PC.
    • There is no need for a programmer to be in restrictions of IT experience because most programmers have more experience with PC's than most IT folks.
  10. Every programmer shall be allowed to attend a developers conference once a year.
    • If companies are willing to pay 60k-100k a year for programmers, they can fork over the other 2k needed for the conference.

All things listed here are the basic needs of a programmer.  They are the movers and shakers that make companies faster with both commerce and day to day operations.  Companies are expected to follow most of the these requirements.  If you are not getting the rights you deserve, ask for more or find another place to work.

kick it on

If you liked this post, please be sure to subscribe to my RSS Feed.

What else do companies have to do to keep Software Engineers?

30. March 2008 22:09 by Scott in   //  Tags: , , , ,   //   Comments (14)

A few days ago, I read a great article about creating a Great Place to work for software engineers.

It covers the newly tried and successful 4-day work week, Working from home on Flexible time, profit sharing, and overtime.  I do have a few thoughts on this though.  The 4-day work week is an amzing feature, I love the idea of this and would hope that all companies would either implement the 4-day work week or the 20% Google Time. I would love either one to be implemented. The work from home and Flex time is an amazing feature and I have personally written to my companies Vice President for a request on this one along with the 20% time.  She only said that she forwarded to HR.  This makes me sad.  Profit sharing and overtime, I agree that there should be no profit sharing, because this income only allows the company to grow and push out into more fields of their prospective market.

I would like to add two more requirements to the list.

1. Two monitors that measure at 19" or bigger.
2. A very comfortable High Back chair.  The current chair I would in is high back, but it doesn't support my back the way it needs to. I honestly think very little research went into these kinds of chairs.

Before I would ever get hired by another company, these two things would be requirements on my part.

Scott Pio

Why do I document Code?

28. March 2008 00:23 by Scott in   //  Tags: , , , , ,   //   Comments (59)


Hello and welcome to another session of why do I document code.  Today's contestants are:

1. The Software Requirements Document otherwise known as the SRD - This valuable little document tells the developer what to develop.  Is was started by the Carnegie Mellon.  It is used as a contract document between the developers and the customer.  The customer starts the document by what they expect the program to do.  Everyone knows that the customer always changes their mind, well if you use the SRD, they are held by a legally binding contract that specifically states what to develop.  You as a developer don't develop anything else except for what this document states.  Therefore if the customer changes their minds, well you can either point back to the SRD or decide to charge them more money.

2. The Database Maintenance Manual otherwise known as the DMM - This handy dandy contestant describes every little feature about your applications database.  IT describes the tables, the columns, the attributes of the columns, the generated script of the entire database, the user logins, the ways too install and upgrade the database on another machine, the DTS and last but not lease etc...  This basic manual describes in detail every single part of the database.  The reason for this is if you had a total hardware melt down and nothing works, well you now have a copy of the database that can be recreated using the script that was generated and put inside the file.

3. The Software Design Document also known as the SDD - This massive document describes all the methods, namespaces and functionality of the Code.  IT also describes the developers thoughts and opinions to why they code the application one way compared to another.  When I say everything, I mean everything. This document has all the developers thoughts and opinions when they were designing and developing the code.  Thank god most comments can be extracted via an XML parser.  The XML parsed comments can even put it into a nice little help file just like  Where can you learn how to write one, well let me tell you.  Our good friends(Not really at all) at Bit Formation has made a great tutorial on how to write one.

4. The User Guide -  The user guide plain and simple is the thing users use to get around the application.  Every little thing that was EVER created by man has some sort of user guide attached to it.  These are a no-brainer, but long and tedious to write just like the other documents listed here today!

Now that you know our contestants, lets find out why you would do such a thing.

Alright, enough with the game show. I thought it would be a good starter.  I completely agree that all the documents though rather tedious and considered a time waster by developers is a necessary part of life.  Developers need to both COMMMENT CODE and write documentation.  That is the way it should be and should end up.  Documents are there in case you as the developer get into some kind of horrific accident and are no longer able to continue on.  They must find someone else to keep going.  Sorry, but that's the way life is.  You are writing the documentation incase you have to be replaced.  I currently work on a 20 year application and I know for a fact that I will not be working on this same application for another 20 years.  I just won't do it.  It is too boring and mundane.  I do know that some day, they will hire another guy or girl who will have to continue my work and when that day comes, the documents are there.

Ladies and gents, just think of documents as another day in the life of a developer. Things must be documented.

Scott P.

kick it on  

Quick Post on problems I am having.

26. March 2008 00:51 by Scott in   //  Tags: ,   //   Comments (14)

So, I am creating a web application over at , and I am completely renovating the app and converting it from PHP to  Its a huge job but I decided to take it up.  Thought it would be fun. heh.

Today I got there error:
An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

I found a workaround and wanted to post it really quick.

Step 1 - You gotta produce the error!

Step 2 -  Go to Start -> Microsoft SQL Server 2005 -> Configuration Tools -> SQL Server Surface Area Configuration.

Step 3 - Go to Remote connection under Database Engine

Step 4 - Click on Local and Remote Connections.  Allows the testing group to connect.

Step 5 - Now, you have to stop and start SQL Server for the changes to take affect, so go back to Service Tab and press Stop and then Start.

Happy Building!

kick it on  

Google/YouTube and TiVo to Launch an at home Service

23. March 2008 22:18 by scott in   //  Tags: , , ,   //   Comments (0)

For something that has not been in the news, Google and TiVo just joined up to launch YouTube video viewing on TiVo boxes by year end.  YouTube videos are watched about 66,000,000 times a month and now you will be able to watch it at home if you have a broadband connection and  a TiVo Series 3 box.  Just imagine the advertising revenues Google will bring in for YouTube that has YET to produce significant profits.  Everyone in the country has a TV, not everyone has a computer.  Google is just satisfying their over all goal, which is to organize the worlds information.  Just imagine, no more TV programs and large TV companies that demand a specific amount of commercials.  These companies have already started to post their shows online the day after it airs, just imagine the shows now straight to your TV instead of Illegally downloading them on things like Torrents.

Sometimes I dislike Entrepreneurs!

18. March 2008 11:28 by Scott in   //  Tags: , ,   //   Comments (61)

So I read an article today about Kevin Ham.  Anybody heard of him?  This man has not only been named "The man who own's the Internet", but also beats out Internet Moguls like John Chow. Kevin, built a 300 million dollar empire over night.  On what you say?  Buying up Internet domain names and throwing advertisements on each site he bought.  Why does this idea make me not only upset, but Furious?  Well, first it was a GREAT idea to buy up the domains. Hah, I wish I though of it first.  Why does it make me mad?  Well, because when I go searching for a new domain name to add and actually put content on, He already owns them!  I honestly wish the United States would call this a monopoly on domain names and force him to let go of most of them.  The Internet is free and I would rather like to see great content out on 300,000 domain names than advertisements. It would make the world a better place, I think.

I actually wonder if the politicians know about this at all?  Well, it just disappoints me that content can't be put on sites like these, but It does say at the end of the article that Kevin plans on putting content on the sites, but how long and what kind of content would he actually decide to put on the sites.  That also brings on another thought, if he does not like the content then he can be a dictator as such and have it removed.  This I think is a form of obstructing free speech.