Erich Peterson

Bio and Blog

Archive for the ‘Tech’ Category

If you ever want to see a list of keys in your current database or see some of their properties (e.g. the encryption alogorithm used), just use the two statements below to list your symmetric and asymmetric keys from the system catalog views:

SELECT * FROM sys.symmetric_keys;
SELECT * FROM sys.asymmetric_keys;

I’ve received several questions concerning my article on 4GuysFromRolla on “Customizing the CreateUserWizard Control“, which center around the same problem. So, I thought I would just put my solution here, in case anyone else was confused about the same thing as well.

The question concerns, the way in which my example asks for the user information in the last step. Some people (and they are right) say that usually the username, password, etc… are asked for in the first step of a web application, and then after that the user is usually asked for more information. Several people have asked, “Is is possible to ask for the user info in the first step of the CreateUserWizard?” Someone tell me if I am wrong, but I don’t think it is possible, at least using the CreateUserWizard. I believe you will have to programmatically add the user using the Membership.CreateUser method.

Of course, you could still make the login process a multi-stepped process using the Wizard control.

  • 1 Comment
  • Filed under: Tech
  • The Temple Secret, Revealed

    Im obviously shamelessly stealing the title from one of my favorite software related articles, “The Iceberg Secret, Revealed” by Joel Spolsky. In a nutshell, Joel explains how important a good UI is, how nonprogrammers view them, and ultimately he hands out some advice on how to deal with that.

    In this article, I wanted to let everyone in on what I call the “Temple Secret”. Well to get started, let me introduce Mike. Mike works as a junior software developer for a small to medium sized company. When I say “junior”, I mean he is not a team leader or anything like that; he simply has no influence in the companys direction. What I mean by that, is that if he does a lousy job, the company might not sell as many units or get the client to renew their contract, but nothing catastrophic will happen to the company.

    Mike is unhappy with some things at work. He sees some processes at his company, which are just leading the development team in the wrong direction. Moreover, because he minored in psychology while in college, he thinks it is going to hurt the company if they continue to hire so many people who are related. A few other small things bother him as well.

    After a year of working for the company, it was time for Mike to have his 1-year review with his supervisor. By the way, this supervisor is a co-founder of the company he is working for. Going over some of the ratings his project managers have given him, it turns out hes doing a pretty good job. He likes most of the PMs, most of them like him. They feel he is doing a good job and everything seems right in the world. Until, Mikes supervisor says the ill-fated question: “So is there anything you are unhappy about?”.

    What should Mike do? Should he say: “Everything is great!”? Or, should he voice some of his concerns and talk about some of the things he is unhappy about? Well, Mike feels his supervisor is a pretty cool guy and he knows he prides himself on being “one-of-the-guys”. Mike decides to just bear it all. Afterwards, the supervisor seems extremely stunned and tells Mike he thinks he is really paranoid, emotional, angry, and is just poisoning the company with his thoughts and opinions.

    Mike is then told to pack up his desk and leave (he is fired).

    So what is the “Temple Secret”? The secret is that most company founders or those who have a large stake in the company and/or its direction–view their company as a temple. As such, their temple cannot contain those individuals (especially lower ranking) who have any types of negative opinions or disagreements with the direction of the company. Therefore, any individuals not found to be pure of heart, must be purged.

    The conclusion or lesson to be learned is that, if you have no stake in the direction of the company and you disagree with the direction in which the company is going or in its processes or practices, keep the opinions to yourself. If Mike doesnt like the way things are being done, he should keep quite and/or look for another job.

  • 3 Comments
  • Filed under: Ramblings, Tech
  • Blog Down + Virtuoso Net Solutions

    As some of you may have noticed, my site was down for 3-4 days. The reason, was that, the server I was hosting on at Virtuoso Net Solutions was hacked. What’s more is that the company cliams all the backups were compromised as well. Now I don’t know about you, but I think you should store the backup away from the server! I don’t really know if they are telling the truth about that or not, seems kind of careless it if is. What’s more is that Shanghai Blog was hosted on the same server, so I am going to have to find a new host and restore the backup of it as well, as soon as I can.

    Right now I am hosting this site on GoDaddy, which so far I am pleased with.

    Well stay tuned for more developments.

    PS - Some of your most recent comments may be lost, due to the fact, that I had to restore the backup from about a month ago.

  • 0 Comments
  • Filed under: Ramblings, Tech
  • Shanghai Blog + Other Stuff

    Well, I have embarked on yet another pet project. This time it is with the help of Jiang and Siqing. We have created and launched Shanghai Blog. It is basically a community blog for the city of Shanghai in China. So, if you are not interested in Shanghai and/or your not from Shanghai, then this probably doesnt interest you in the least…so Ill shut up now about it.

    Lastly, I recently finished up another article for 4GuysFromRolla, on the cutomizing the CreateUserWizard in ASP .Net 2.0. As soon as it has gone through the editing/approcal stage, you should see it up there (give it a week or so).

    Update: The article is up now here: http://aspnet.4guysfromrolla.com/articles/070506-1.aspx

  • 0 Comments
  • Filed under: Tech
  • The article in which I was approved to write for the website 4GuysFromRolla, has been posted live and can be found here:

    http://aspnet.4guysfromrolla.com/articles/062106-1.aspx

  • 0 Comments
  • Filed under: Tech
  • In the beta releases of ASP .Net 2.0, one could simply set the Visible attribute to False on a BoundField column in a GridView control, and then retrieve the value of the BoundFields selected row by accessing the SelectedValue attribute of the GridView like so (maybe in the SelectedIndexChanged event):

    string SelectedRowValue = GridView1.SelectedRow.Cells[0].Text;

    But, in the final release you cannot do this, for security reasons. The previous code will just return an empty string. Now what should be done to get the value, is to not include the BoundField column you do not want to display at all. Instead, you should include the column name in the DataKeyNames attribute of the GridView. Then in the event you can retrieve the value like so:

    string SelectedRowValue = GridView1.DataKeys[GridView1.SelectedIndex].Value;
    

  • 0 Comments
  • Filed under: Tech
  • Writing…

    Just a quick note to say, I was approved to write an article for 4GuysFromRolla. I used that website a lot for reference material and tutorials when I first was learning ASP .Net. The article is basically an easy introduction into AJAX using Microsoft’s Atlas framework and ASP .Net 2.0. Hopefully after the review process it will be up there in the next few weeks. Wish me luck.

  • 0 Comments
  • Filed under: Ramblings, Tech
  • ASP .Net 2.0 Misc. Articles

    Recently I’ve been diving into ASP .Net 2.0 pretty heavily and I wanted to share a few helpful articles I have come across and have found invaluable working on an ongoing personal project (shhhh it’s a secret).

  • 0 Comments
  • Filed under: Tech
  • I would like to share a talk I had with one of my close friends on our unhappiness with our careers or at least for me the last several jobs I have had. The conversation had to do with the parallels between construction work and computer science.

    The jist of it is thus:

    Programmers = Construction Workers: They are told what goes where and that is pretty much it. They have no say in the specifications or design. Moreover, they tend to be less respected and are seen as disposable; for the simple fact that a lot of people can perform the duties.

    Developers = Construction Foremans: Serves as the leader of the construction crew (development team in our case). Has more experience and/or expertise and is respected much more by the engineers and achitects. Might have had formal education in his/her field.

    Software Engineer = Engineer: Went to college and earned a degree. Manages the total construction of a structure (project). It is his feedback, planning, managing, and relationships with workers under him that will ultimately determine if the project is a success or failer.

    Architect = Architect: Pretty self-explanitory. Responsible for the design of a structure (project). If he didn’t design the structure well, the project will be a failer.

    In the jobs I have had thus far in my career, I have felt like the construction worker. I’m told what needs to be done and I do it. There is some thought involved or course, but it does not come close to my full capabilities. Moreover, I have a college degree and almost a Masters degree. Shouldn’t I be given the opportunity to use my learned skills, given more respect and more responsibilities, and ultimately good compensation? According to my skills and formal training I shouldn’t be at the bottom of the ladder (construction worker) I should be in the middle somewhere.

    So, that is were a lot of frustration in my career comes from and I believe it is the same frustration many others in my field have as well.

  • 1 Comment
  • Filed under: Ramblings, Tech