This is a collection of thoughts, articles, helpful hints of mine (or at times others) that are technology related
Monday, December 27, 2010
Interesting Flash issue
At this point I was very frustrated with the install until I started to think about the environment that I was working in. I am running a 64 bit version of Windows 7 and Flash is a 32 bit application and as such Flash is installed in the path C:\Windows\SysWOW64\Macromed\Flash\. I made a guess that the application is probably doing a version check of the Flash binary using a hard coded path to the default installation path. In most situations this is C:\Windows\System32\Macromed\Flash\. In a Windows 64 bix OS all the 64 binaries are stored in the C:\Windows\System32 folder (even though this sounds a bit odd) so flash would not be installed at this location.
So even though I know that the Flash binaries would not work in the C:\Windows\System32 folder in order to get the application to get past this binary version check I copied the Macromed folder and its contents to the C:\Windows\System32 folder and now the application works and Flash still works (since it is really executing via the C:\Windows\SysWOW64\ path).
Not a pretty workaround and is, in my opinion, a flaw in the application it works without impacting any other applications.
Tuesday, August 10, 2010
Oracle: Check to see if a value is numeric
I wanted something that would provide a result of 0 (is not numeric) or 1 (is numeric). Below is a SQL statement that I used during th e"playing" around process.
SELECTThe idea behind this code is that first we take a string value (or field) and use the translate function to remove all of the numeric values and characters that are used with numeric values with nothing. Around that value I used the length function to return the length of "translated" value. I then evaluate the length. If it is larger than zero then I return a value of 1, becuase any value with a length greater than zero has a non-numeric character in it. Otherwise it returns a value of 1 (which means that the value is a numeric value).
CASE WHEN nvl(length(translate(trim('111d'), ',.+-0123456789', ' ')),0) > 0 THEN 0 ELSE 1 END NonNumeric,
CASE WHEN nvl(length(translate(trim('1111'), ',.+-0123456789', ' ')),0) > 0 THEN 0 ELSE 1 END Numeric
FROM DUAL
I attempted to put together syntax to create a function called ISNUMERIC and pasted it below. I do not have an Oracle database on this server or have access to an Oracle in this environment to be able to run this code to make sure that it executes properly. I believe it will work though it has not been tested.
CREATE OR REPLACE FUNCTION ISNUMERIC (VALUE IN VARCHAR2)
RETURN NUMBER
AS
BEGIN
IF nvl(length(translate(trim(VALUE), ',.+-0123456789', ' ')),0) > 0
THEN
RETURN 0
ELSE
RETURN 1
END IF
END ISNUMERIC;
Monday, August 9, 2010
Utility to check to see if a database is alive
I decided to go with a simple VB solution using Visual Studio 2005. I am sure there are better ways to accomplish the same thing though time was of the essence and I needed a workable solution and only had a day to do it.
I started off creating a new Visual Basic console project in Visual Studio. I deleted the default module that was part of the project when it was created and created a new module named MainModule. I added a new class to the module to manage the database connections.
I started with the connection class. I needed to be able to handle multiple types of database connections. Best practice is to have a class for each type of database connection all of which having the same functions to more ligically handle and manage the different code needed for the different connections. I did not have time to do best practice. Instead I put in a switch statement to manage the different database types.
First off I created class level variables to manage connection variables.
Private _oracleConnString As StringAfter the variables I added a "New" sub procedure which receives values that are assigned to the class level variables.
Private _sqlConnString As String
Private _odbcConnString As String
Private _dataType As String
Private _dataSource As String
Private _userId As String
Private _password As String
Private cnOracle As OracleClient.OracleConnection
Private cnSql As SqlClient.SqlConnection
Private cnOdbc As Odbc.OdbcConnection
Private writer As StreamWriter
Private logFile As String
Public Sub New(ByVal DataType As String, ByVal DataSource As String, ByVal UserID As String, ByVal Password As String)The last part of this class is a function for the module code to call to open the database connection and return a result. The function starts off with a variable to store a boolean value on whether the connection was successful or not. The value of this variable is the return result for the function. After that I created a switch statement based upon the database connection type (MS SQL, Oracle or ODBC). Each connection attempt is surrounded by a try/catch statement. If there are any errors the process writes the error to an error log.
_dataType = DataType
_dataSource = DataSource
_userId = UserID
_password = Password
_oracleConnString = "Data Source=[DATASOURCE];Persist Security Info=True;User ID=[USERID];Password=[PASSWORD];Unicode=True"
_sqlConnString = "Data Source=[DATASOURCE];Persist Security Info=True;User ID=[USERID];Password=[PASSWORD]"
_odbcConnString = "Dsn=[DATASOURCE];uid=[USERID];pwd=[PASSWORD]"
logFile = "dbcheck.log"
writer = New StreamWriter(logFile, True)
End Sub
Dim success As Boolean = FalseNow that the connection class is complete it was time to put together the code for the main sub procedure in the main module that will capture the command line arguments and perform the connection test using the provided arguments.
Select Case _dataType
Case "Oracle"
_oracleConnString = _oracleConnString.Replace("[DATASOURCE]", _dataSource)
_oracleConnString = _oracleConnString.Replace("[USERID]", _userId)
_oracleConnString = _oracleConnString.Replace("[PASSWORD]", _password)
cnOracle = New OracleClient.OracleConnection(_oracleConnString)
Try
cnOracle.Open()
cnOracle.Close()
Return 1
Catch ex As Exception
Console.Write(ex.Message)
writer.WriteLine(Now.ToString())
writer.WriteLine(ex.Message)
Return 0
End Try
Case "SQL"
_sqlConnString = _sqlConnString.Replace("[DATASOURCE]", _dataSource)
_sqlConnString = _sqlConnString.Replace("[USERID]", _userId)
_sqlConnString = _sqlConnString.Replace("[PASSWORD]", _password)
cnSql = New SqlClient.SqlConnection(_sqlConnString)
Try
cnSql.Open()
cnSql.Close()
Return 1
Catch ex As Exception
Console.Write(ex.Message)
writer.WriteLine(Now.ToString())
writer.WriteLine(ex.Message)
Return 0
End Try
Case Else
_odbcConnString = _odbcConnString.Replace("[DATASOURCE]", _dataSource)
_odbcConnString = _odbcConnString.Replace("[USERID]", _userId)
_odbcConnString = _odbcConnString.Replace("[PASSWORD]", _password)
cnOdbc = New Odbc.OdbcConnection(_odbcConnString)
Try
cnOdbc.Open()
cnOdbc.Close()
Return 1
Catch ex As Exception
Console.Write(ex.Message)
writer.WriteLine(Now.ToString())
writer.WriteLine(ex.Message)
Return 0
End Try
End Select
I started off with the declaration of variables
Dim _dataType As StringNow that the variables are declared I added a process to cycle through the provided command line arguments and assign the values to the proper variables.
Dim _dataSource As String
Dim _userId As String
Dim _password As String
Dim I As Integer = 0
For Each arg As String In argsAfter the arguments are processed it is time to add the code that calls the connection class and tests to see if the connection is successful.
If arg.ToUpper = "/DATATYPE" Then
_dataType = args(I + 1)
End If
If arg.ToUpper = "/DATASOURCE" Then
_dataSource = args(I + 1)
End If
If arg.ToUpper = "/USERID" Then
_userId = args(I + 1)
End If
If arg.ToUpper = "/PASSWORD" Then
_password = args(I + 1)
End If
i = i + 1
Next
Dim success As Integer = 0A sample command line to execute this utility is:
Try
Dim cn As Connection = New Connection(_dataType, _dataSource, _userId, _password)
success = cn.Open()
Catch ex As Exception
Console.Write(ex.Message)
End Try
If success = 1 Then
Console.Write("SUCCESS")
Else
Console.Write("FAILURE")
End If
dbcheck.exe /DATATYPE SQL /DATASOURCE SERVERNAME /USERID USERNAME /PASSWORD PASSWORDTo download a copy of the code click this link.
Sunday, August 8, 2010
How to create a utility to send an email via the command line
There are quite a few ways to accomplish this and there are already some utilities that I have seen that can do this though my need was to have a solution in a very short period in time. There was no need for any bells and whistles. They only needed the base functionality to being able to send the file via email and they needed the solution as soon as possible.
I decided to build the utility using Visual Studio 2005 with Visual Basic (though C# is currently my preferred language).
I began by creating a console application called "sendmail". I deleted the default module that was created when the project was created. I added a new module named "SMTPMail". In that module I have two classes, SMTPMail and SendNewMail.
The SMTPMail class is where I will setup the properties and functions needed to send the email. The SendNewMail class is used as a wrapper to collect the informaion from the command line and pass it to the SMTPMail class.
In the SMTPMail class I first added variables needed to store the infomation to send the email
Private _from As StringNext I defined the properties needed to populate the variables
Private _to As String
Private _toName As String
Private _cc As String
Private _bcc As String
Private _attachment As Attachment
Private _subject As String
Private _body As String
Private _smtpPort As Integer = 25
Private _smtpServer As String
Public Property SendFrom() As StringThe next step was to add a function to prepare the email message
Get
Return _from
End Get
Set(ByVal value As String)
_from = value
End Set
End Property
Public Property SendTo() As String
Get
Return _to
End Get
Set(ByVal value As String)
_to = value
End Set
End Property
Public Property SendToName() As String
Get
Return _toName
End Get
Set(ByVal value As String)
_toName = value
End Set
End Property
Public Property SendCC() As String
Get
Return _cc
End Get
Set(ByVal value As String)
_cc = value
End Set
End Property
Public Property SendBCC() As String
Get
Return _bcc
End Get
Set(ByVal value As String)
_bcc = value
End Set
End Property
Public Property SendSubject() As String
Get
Return _subject
End Get
Set(ByVal value As String)
_subject = value
End Set
End Property
Public Property SendBody() As String
Get
Return _body
End Get
Set(ByVal value As String)
_body = value
End Set
End Property
Public Property SMTPPort() As Integer
Get
Return _smtpPort
End Get
Set(ByVal value As Integer)
_smtpPort = value
End Set
End Property
Public Property SMTPServer() As String
Get
Return _smtpServer
End Get
Set(ByVal value As String)
_smtpServer = value
End Set
End Property
Public Function PrepareMessage() As MailMessageThe last elements that would need to be added to this class are the sub procedures needed to add the attachment to the message and the procedure to send the message.
Dim toAddr As New MailAddress(_to, _toName)
Dim msg As New MailMessage(_from, _to, _subject, _body)
If Not _toName = String.Empty Then
msg.To.Clear()
msg.To.Add(toAddr)
End If
If Not _attachment Is Nothing Then
msg.Attachments.Add(_attachment)
End If
If _cc <> "" Then
msg.CC.Add(_cc)
End If
If _bcc <> "" Then
msg.Bcc.Add(_bcc)
End If
Return msg
End Function
Public Sub AddAttachment(ByVal FilePath As String)I did not add any comments (which is bad form) and there is not much explanation on each of the lines of code though it is very self explanitory if you are familiar with VB.
_attachment = New Attachment(FilePath)
End Sub
Public Sub Send()
Dim mailClient As New SmtpClient(_smtpServer, _smtpPort)
mailClient.Send(PrepareMessage)
End Sub
Next I needed to add the code to the SendNewMail class to collect the information from the command line and send it to the SendMail class.
Within this class there is only one sub procedure, "Main". This is the procudure that will be called by the console when the executable is run. I began editing this procedure similar to the other class by creating the variables I needed to store the information passed from the command line.
Dim _sendMail As New SMTPMail
Dim _trace As Boolean = False
Dim trace As String
Dim logFile As String = "sendmail.log"
Dim writer As StreamWriter = New StreamWriter(logFile, True)
Dim i As Integer = 0
NOTE: The variable "_trace" is a boolean variable used to see if the user wants to create a log file to log all the transactions that pass through the executable.
Next I setup a for/next loop to cycle through each of the parameters that are passed from the command line and sets the variables with the passed values where appropriate. A sample of the command line that I wanted to use would look like this:
c:\projects\sendmail\sendmail.exe /SMTPServer "servername" /To "bob@test.com" /From "sam@test.com" /Subject "test email" /Attachment "c:\projects\sendmail\test.pdf"The for/next loop needed to be able to handle a command line in this format. If any of the desired parameters are found in the command line arguments then the process will take the argument directly after it and assign it to the appropriate variable
For Each str As String In argsLastly I created a "Try" statement to handle the sending of the email as well as some loging processes. It is very important in development to add the ability to "trace" an application to help troubleshoot errors. Within the "Try statment I check the _trace variable to see if the commandline had an argument to turn on tracing. If it does then it will output all the values being send to the email process to the log file. Next the process will call the function to send the email with the provided parameters. If there is an issue with sending the email the the "Catch" portion of the statment will output the error to the log file and lastly the "Finaly" portion of the statement will clear and destroy any open references in the code.
If str = "/SMTPServer" Then
_sendMail.SMTPServer = args(i + 1).Replace("", """")
End If
If str = "/SMTPport" Then
_sendMail.SMTPPort = args(i + 1).Replace("", """")
End If
If str = "/To" Then
_sendMail.SendTo = args(i + 1).Replace("", """")
End If
If str = "/ToName" Then
_sendMail.SendToName = args(i + 1).Replace("", """")
End If
If str = "/From" Then
_sendMail.SendFrom = args(i + 1).Replace("", """")
End If
If str = "/Subject" Then
_sendMail.SendSubject = args(i + 1).Replace("", """")
End If
If str = "/Body" Then
_sendMail.SendBody = args(i + 1).Replace("", """")
End If
If str = "/CC" Then
_sendMail.SendCC = args(i + 1).Replace("", """")
End If
If str = "/BCC" Then
_sendMail.SendBCC = args(i + 1).Replace("", """")
End If
If str = "/Attachment" Then
_sendMail.AddAttachment(args(i + 1))
End If
If str = "/Trace" Then
_trace = True
End If
i = i + 1
Next
TryClick this link to download the vb file that I used in the project
If _trace Then
trace = "SMTPServer=" & _sendMail.SMTPServer & ":"
trace &= "SMTPPort=" & _sendMail.SMTPPort & ":"
trace &= "SentTo=" & _sendMail.SendTo & ":"
trace &= "SentToName=" & _sendMail.SendToName & ":"
trace &= "SendFrom=" & _sendMail.SendFrom & ":"
trace &= "SendSubject=" & _sendMail.SendSubject & ":"
trace &= "SendBody=" & _sendMail.SendBody & ":"
trace &= "SendCC=" & _sendMail.SendCC & ":"
trace &= "SendBCC=" & _sendMail.SendBCC & ":"
trace &= Now.Date.ToString("yyyyMMdd") & " " & Now.TimeOfDay.ToString() & vbCrLf
writer.WriteLine(trace)
End If
_sendMail.Send()
Catch ex As Exception
trace = ex.Message & " - " & ex.StackTrace.ToString & vbCrLf
trace &= Now.Date.ToString("yyyyMMdd") & " " & Now.TimeOfDay.ToString() & vbCrLf
writer.WriteLine(trace)
Finally
If Not writer Is Nothing Then
writer.Flush()
writer.Close()
writer = Nothing
End If
End Try
End Sub
Sunday, April 18, 2010
Who Are You - Your Personal Brand
Who are you…..?
Or more importantly who do you want others to perceive you to be. With the emergence of social media more and more of our lives are becoming visible to others. In some ways this is good and in other it has been disastrous.
Most people consider marketing something that only business need to be concerned with, though each of us have our own personal brand. Our personal brand is the person that others perceive us to be.
Historically most people’s personal brand encompassed first impressions and our résumé. In our current time where social media is a large part of our life our personal brand now encompasses many other elements; blogs, social forums, email addresses, web sites…. If we are not careful and do not plan our interactions carefully we could be creating a personal brand that is contrary to what we want it to be.
For the longest time I stayed out of the social media arena because I wanted to be careful not to harm my professional image with a lot of personal stuff that my employer, potential employer or clients do not need to know about. Recently I came to a realization that I am also hurting my personal image as much as I am protecting it. In essence if I am not visible in the social media arena I am reducing my visibility and my professional image only encompasses personal interaction and what others write about me. I finally started to get out there and did some research and planning so that I can be wise about my activities. I have made mistakes none of which have been embarrassing though they could have led that way if I was not already being a little shy about my interactions.
The first suggestion that I would make is to try to segment your personal and professional life as much as possible. This starts with your email address. Get a professional email address, one that is not tied to your internet service. Using your free accounts that come with your internet service is convenient though if you ever change your service it could cause issues with people wanting to connect with you professionally. Plus, by using those emails you are doing more marketing for your service provider than you are for yourself. Use an address that is professional. CutE85@hotmail.com is probably not a good representation of someone who wants to get into public office. Remember first impressions are extremely important and in these times potential employers my have more interaction with our email address than they do with us personally. Try to keep your professional and personal addresses different enough that if someone Google’s your professional email address they do not come up with your personal life as well.
Social networking sites can be important to building or destroying your personal brand. Be careful on what you post and who can see your posts. Don’t just befriend anyone that requests it. Make sure that they are people you know. You would not want a comment made by a “friend” to potentially cause you embarrassment to you professionaly. According to Melanie Gallegas (link) 8% of US companies have sacked social media miscreants. Whether you like it or not you represent the company you work for. If you list their name on your linkedin account, mention them on your Facebook page or wear their company logo and post a picture of it online then you represent them for good or bad. Following are a few examples of how poor choices in social media have affected other’s employment.
Stacy Snyder (story quoted from a myspace.com forum)
“In the absence of strong protections for employees, poorly chosen words or even a single photograph posted online in one’s off-hours can have career-altering consequences. Stacy Snyder, 25, who was a senior at
Unknown Coke employee (quoted from an article by Janine Yancey)
“During the height of the cola wars in 2003, a Coke delivery driver was fired for sipping a Pepsi on the clock, while a
Unknown Facebook User (paraphrased from a presentation done by Melanie Gallegos)
A Facebook user posted a comment about how she hated her job and that her bass was a “Wanker”. Unfortunately for her she did not remember that she had added her boss to her list of friends and he promptly responded that she did not need to report to work the next day.
A potential Cisco employee (quoted from an ABC New article by Dalia Fahmy)
“One Twitter user posted an update last year saying "Cisco just offered me a job! Now I have to weigh the utility of a fatty paycheck against the daily commute to
A Cisco employee responded, "Who is the hiring manager? I'm sure they would love to know that you will hate the work. We here at Cisco are versed in the Web."
Needless to say, the applicant did not end up working at Cisco.”
On the other hand your social media presence can work for you. The other day I was in a training session for a product called SharePoint from Microsoft. During the meeting the trainer had commented that if we wanted to know more about a specific topic that we should check out a person’s website (to be honest I forgot her name and did not write it down). She was not an employee of Microsoft. She is just considered an expert on that platform as a result of her social media interactions. She has made a name for herself doing nothing more than blogging about helpful hints and learned best practices that she has come across.
Another example is from one of my favorite authors, Brandon Sanderson. Not too long ago another one of my favorite authors, James Rigney (AKA Robert Jordan) had passed away. Sanderson had posted a blog about Rigney’s influence in his life and how it helped to give him direction in his current profession as a Science Fiction writer. The message that he wrote was very touching. So much that Rigney’s widow, Harriet, had somehow got a hold of this note and later contacted Sanderson to finish Rigney’s legacy in writing the final book (later to become three books) of the Wheel of Time series. The fact that Sanderson is a wonderful writer also playing into her decision I am sure.
After hearing about these stories you may be thinking, “Hey we live in a country where we have free speech and should be able to say what we want to say.” That is true though that free speech can still have negative impacts. Whether you like it or not you represent your company and employers or potential employers will not want to be associated with anyone that could do their brand harm. They may not come out and say that you did not get hired, did not get promoted or did not get the desired raise because of your social media interactions but that does not mean it did not happen and they found another reason to disguise it. By all means use your rights to free speech though do it in a way that it does not mar those that you professionally represent.
It is important for you to take control of your personal brand and control the parts of it that you want your professional network to see. Businesses do this all the time through the use of SEO and SEM. Take control of your personal brand and how your professional network perceived you. Gallegos mentioned in her presentation some elements that I am going to expand upon that you should consider in planning and implementing your personal brand.
- Come up with a “keyword”; your full name, nickname, married name or “handle” that you want to own and stick to it.
This is especially important if you have a common name. I have a very common name. In fact if you were to Google my name the chance of getting any info about me is next to impossible. Most likely your first hits will be regarding the
- Buy a domain and build a website of blog.
If possible have a domain name that matches your “keyword”. Also make sure that the content is appropriate. Expressing you thoughts about a drunken party the previous evening on your Small Business Technology blog would not set the right tone. Also, if you are trying to promote yourself as a web designer please have a decent website. I was involved in a situation where I was helping a friend find a web designer for his small business. He did not have enough to pay for a big company to do it so we were looking at some independent developers. I was sadly disappointed by the number of people who were promoting their services and had terrible websites themselves. Make sure that if you profess a certain profession or skill set that it can be backed up by what people can see.
- Use an email address from your professional domain as your email address for all professional correspondence.
Do not use your personal email address for professional use. It will make it too easy for personal interactions to become professional correspondence. If you use social networking sites like MySpace, Facebook, Twitter… have a profile associated to your personal email and another for your professional email. Yes that will make it a pain to manage though it can save you some potential embarrassments in the future. Also if you have a smart phone where you keep your social networking sites logged in at all times have it connected to your personal account. You do not want the boss to know that you are out golfing with a buddy when you are supposed to be at home sick.
- Link all of your professional networking sites together using your “keyword” and with links to your profile.
An example: Recently I have started writing articles for one of my favorite websites, CodeProject (though I only have two articles up there as of yet). On my profile for that website, I added a link to my LinkedIn profile. My LinkedIn profile has a link to my Facebook profile. My Facebook profile has a link to my CodeProject profile. And all three have links to my technology blog. All of these accounts I have associated to the same email address that I use for all of my professional interactions.
- Blog positioning your credibility, personality or expertise/thought leadership.
If you blog make sure that your blogs are relevant to your personal brand. Show that you know what you are talking about and that you are a leader or expert in that field. Don’t spend time talking about how great you are. No body likes personal aggrandizements. Be humble and let your work speak for itself. Make sure to keep confidential information out of your blogs. Hackers and corporate pirates constantly look at social media to find info that can help them to steal or get an edge of other businesses. Many times you will see a system admin posting a specific problem that they encountered and put too much detail in to the note and gave someone all the info that they would need to hack into the company’s website. If you pick up any “how-to” book in hacking the first think it will recommend is to check help groups and blogs to get info that can help to hack the network.
- Consistency.
People like others that they can rely on. If you are a blogger and you really want to build your brand through that medium then you need to blog about relevant info and often. If you only post a blog once every three months or are inconsistent on your schedule then others will not know when to check out your blog and may lose interest. This is something that I am not good at and plan to get better at. Keep your websites up-to-date and relevant. If you are a hardware specialist then having how-tos relating to fixing a IBM 386 is not going to help you.
- Never assume that anything you post is private
Even on your personal profiles if you assume that anything you post is public even though you have your privacy options set and act accordingly then you will be pretty safe.
- Be aware of who you befriend
Don’t just accept anyone as your friend. Remember that your “friends” also represent you. If you befriend your college buddy’s personal profile on your professional profile and someone in your professional network checks out their page and sees pictures of you dancing on a table after a weekend of dubious behavior the damage is almost as bad as if you posted it on your profile directly. Make sure that your friends understand what that profile is for and act accordingly.
- Be thoughtful about what you put in writing.
Sometimes we are in a hurry to put out a post and put it together quickly to get it out. Make sure that you use spell check and that your grammar is decent. You do not want people to think that you could not handle yourself in a conversation with important people. Also if you are going to quote something provide a reference or link to the information to help provide credibility. In fact there is value in doing so. Links to other sites helps you in regards to search engine optimization. In fact if you reference someone and provide some decent information it could not hurt to send that person a note about it in hopes that they might also link to you in order to drive more traffic and build your name faster.
- When corresponding with others, be diplomatic and engaging.
Never use harsh words or disparaging comments to criticism someone’s words or work. It only makes you look like the fool and may detract from others wanting to associate with you in fear that you might do the same to them. Also it could get you banned from certain sites which would hurt you in your ability to build your brand.
- Include social media elements in your résumé.
If you include your professional website, blogs, email and such in your résumé you will helping to direct potential employers where you want them to go. They will be less likely to Google you and come up with things that you do not want them to see. Not only will this help direct them where you want them to go it can help to show more of your expertise and leadership that it not possible to show in a one or two page résumé.
- Professional logo.
Use an appropriate photo. You should be dressed appropriately and it should be of you. Your pictures of your kids are cute and all but your professional network wants to know about you not your kids.
- Monitor your personal brand
Make sure that you know what others are saying about you. “Google” your “keywords” often to make sure that you are still presenting the personal image that you want to portray. If something negative comes up work to resolve it quickly so that you can reduce any potential issues it could cause. It is true that you can delete comments placed on your Facebook wall though if you get to it after you boss or potential client has already seen it then the damage is already done. Do not allow others to post comments on your social networking sites message boards. You cannot control what they will write and you will be opening yourself up to a potential risk.
- Don’t participate in bad mouthing your employer
Not only could it potentially lead to being black listed or termination in your current employment it could lead prevent you from getting hired somewhere else. Potential employers would be hesitant to bring you on in fear that you would do the same about them. You will be considered damaged goods. Instead of focusing on the bad things about your job, focus on the good things. If there are no good things then do not say anything, just quit and find somewhere else to work. There are a lot of companies out there. If that is not an option then see if there is anything you can do to help make the situation better. If you are allowed to help bring about change, not only would it help to make you happier but is would look great on a résumé.
Remember that everything you do is a potential impact on your personal brand. You want those things that are positive to be in the forefront. Take time to plan out how you want other to perceive you. If you are not sure yet at least lay the ground work so that when you are ready you can make the move without much work. Some sites do not allow the changing of email accounts and you do not want to get locked into something that would not enhance your personal brand.
References:
http://www.salesandmarketing.com/msg/content_display/training/e3i111888fc4afd5a6a15a93bde975fac05
http://www.slideshare.net/gearyinteractive/social-media-for-employment-2020310
http://www.odesk.com/blog/2009/07/facebook-faux-pas-what-not-to-do-in-social-network-view/
Thursday, December 24, 2009
Adventures in DVRing
A few weeks ago I decided to troubleshoot the issue with my Media Center machine not being able to play BluRay disks. I quickly discovered that the issue with my Media Center machine not being able to play BluRay disks was due to my video card that was installed in the Media Center machine. Thinking that this would be an easy fix to the issue I went to Altex (I miss having a Frys Electronics close by, this is the closest store to it). I decided to purchase a EVGA GeForce 9500 GT. It is not the most powerful of cards though it was powerful enough to meet my needs and would last for a while. I brought the card home, took a part my DVR and instantly realized that the card would not fit. The case was a "slim-line" case, which I did not realize previously, and a regular-sized card would not fit.
I took the card back so that I could exchange it for another. Unfortunately there are not a lot of cards that can easily fit into a "slim-line" case. I purchased an EVGA GeForce 210. This card is designed in a way that I could take the face plate off and fit it into the slot in my machine. I brought the card home and fit it into my machine, hooked up all the connections and plugged my machine in to test it. Interestingly enough the machine would not boot up. I could not think of any reason why adding a new video card could do that (typically if the card is bad the machine would still get power though it would beep to let us know that there is a problem). There was no power at all on the board. The fans did not start the indicator light on the board was not on, nothing. I figured it was the power supply though I wanted to make sure.
I made another trip to Altex and purchased a 400w power supply and a power supply tester (I had never seen one of these before and since I help other people with their computers so often thought that it would be a wise purchase). I brought these home. First I connected the old power supply to the tester and it indicated that there was not any power. Next I plugged the new power supply into the tester just to make sure that it was working fine and all the lights came on. So I validated that the tool works fine and the old power supply is dead. Now my problem is this, the old power supply is custom for the box and you cannot go to a store and purchase one of its size, the manufacturer also does not make this part any more and the only way to get a new one is through an after market part supplier. So my decisions are to purchase a new one and wait three weeks for it to arrive, use the new power supply that I bought and modify the box to make it fit, or buy a new box that the new power supply would fit into.
Since I do not have the tools to modify the box and the potential risks associated to it are kind of high, also because I am impatient and did not want to wait for a part to provide I decided to try to rebuild this machine in a new box. Or in other words use all the current internal parts and migrate the to a new box. I went back to Altex and after looking around a bit and came across a new dillema. The current box has a micro ATX motherboard and three PCI cards and an AGP card in it. The problem is that the board itself only had one PCI slot. That PCI slot had a riser card with three more PCI slots in it. I looked at all the boxes that Altex had and could not find any that I could modify so that all the current hardware would fit into it. At this point I was at the end of the day on a Saturday and I decided to leave the decision till Monday (partially because Altex was now closed for the day).
Monday morning came, and since it was Thanksgiving week I had the day off (I took the whole week off) and as soon as Altex was open I headed over to get some new parts. Over the weekend I had decided to replace the motherboard and get a new box so that everything would fit. The box that I found that I liked is an Antec NSK2400. Also in talking to the sales person I decided to buy an ASUS 945GC-MX because the processor that I had was an Intel P4 Socket 775 processor. I took all of that home and started to play again.
After I got home I took everything out of my old DVR box (which was a considerable feat). Once I had everything out I started to go through the motherboard manual and the new encolosure manual to make sure that I connected all the wires from the enclosure to the headers on the motherboard. As I was scanning through the motherboard manual I discovered that the board that they recommended would only support a maximum of 1gb of memory. It would also only support memory modules that have a max of 512 mb. Since I am building a media center PC and since I only had a 1 gb stick of memory this board was not going to work. So I took the board back to Altex along with the second video card (I had compromised earlier to get a card that was not as powerful as what I wanted so that it would fit into the old box and wanted to get the one that I had previously decided upon). I explained my issue and told them what I wanted and they graciously helped me out. In fact they gave me a bit of a discount (I think that they were a little embarrased over the issue with the mother board) and I was able to get a better motherboard (Intel DG41TY) and the previous video card for an even swap of what I was returning. That made me happy.
I took my new parts home and started again to put things together. I got the motherboard, memory, hard drive, DVD player, processor, video card and such installed and plugged it in to go for a test run. After plugging it in I could see that there was power (fans started and motherboard indicator light came on) though there was nothing coming up on the screen. Also I did not hear any of the costomary "beeps" that the motherboard plays to let you know that it is working or if there is an issue. I did some research and found out that the processor that I have is based on the Intel Prescott core which is .90 nm and is a 775 slot processor. The motherboard supports a 775 processors with the exception of this one. It seems that Intel produced one 775 motherboard with a .90 nm form factor though a majority of the processors with this slot format have a .45 nm form factor and as such this motherboard supports all slot 775 processors except for the one that I have. In fact I found out that it would be difficult for me to buy a motherboard for the processor that I have from a store since most stores do not carry them any more. So I headed back to Altex.
I decided to buy a new processor to fit the new motherboard. I purchased an Intel E5200 Dual Core 2.5 ghz processor. After I got home I put the new processor and heatsink on the motherboard (which I had to take everything out of the box because the previous heatsink mounted to the bottom of the board). After I got everything back in I plugged it in and my media center actually started up. Now, due to the change in the motherboard and because some of the custom HP hardware was missing I was getting a few errors when the OS started and had to run some repair processes to fix things. That seemed to fix things though I was still getting random errors that I could not explain. The stability of the machine was in question so I decided to wipe out the machine and reinstall the OS. I resinstalled the OS and all the new device drivers and things started to run wonderfully. Luckily I had backed up all my media on an external drive prior to this point so I did not lose any of my TV recordings and such.
Now that the machine is stable I proceeded to resolve the next issue. In the old machine there was an external card that was connected to the motherboard via a firewire header. Unfortunately I did not realize this until after I had gotten everything together and did not make sure that the motherboard I purchased had this element and it did not. I was not about to rip everything out again and replace the board just for this. I decided to buy an internal firewire card and a cheap firewire cable. I modified the cable to connect to the wire from the external card and then connect to the firewire port on the PCI card. I tried many things, and I could not get the motherboard to recognize the elements on the external card. I am not one to give up, in fact I believe that I can figure just about anything out given time and the right tools and the internet. Unfortunately, I did not have the time or patience to troubleshoot this further (my vacation time was almost up). So I convinced myself that the reason why I could not get it to work is because I did not have the proper device drivers to tell the motherboard to talk to the external card (which could be correct but I doubt it) and decided to buy a wireless keyboard and mouse.
I went to bestbuy on Black Friday to see what deals I could find. While I was there I found that they had a new Hauppauge TV tuner card on sale. One thing to note is that we had just cancelled our cable (so that we could focus on getting rid of my student loans) and my current TV tuner cards were no longer working since they were analog and the over-the-air networks were not all broadcasting in digital. Since the cards were on sale I decided to purchase Hauppauge WinTV-HVR-1850 Dual Tuner card with Media Center remote and a Microsoft Wireless Media Desktop 1000 Keyboard and Mouse.
I plugged the new video capture card in and plugged the keyboard and mouse in. I was very satisfied with the performance of the video capture cards (though there is a bit of a lag in the channels though I think that it is due to the antenna and not the cards themselves). I was sorely disappointed in that the keyboard and mouse only had a range of six feet. I did not see that on the box and did not discover it until I read the instructions in the manual. I was not about to take another thing back so for now I am dealing with it. Another frustrating thing was that even though the remote worked with Media Center it would not work with anything else. I discovered that there is an INI file for the remote drivers that control which applications it can talk to. I found a support page on Sage's website where someone had put instructions on how to edit the INI file so that the remote control can work with other applications (link). After following these instructions I was able to use the remote control with Hulu (which has become a staple in my life without cable) and other applications.
At this point I am done with the rebuild. Initially my desire was just to replace the video card and keep everything else the same though I ended up with everything changing with the exception of the OS and hard drive. Everything else was new. It is amazing how a project that initially looked pretty simple could escallate into something that was pretty complex and difficult to do. In looking back I think that I would have been better off just starting over new and building a new DVR from the ground up instead of trying to take existing hardware and trying to build a new DVR using it. I think that the cost would have been about the same or cheaper due to the driving around, testing, and time. It was still cheaper than buying an equivelant machine from a PC manufacturer though it was still much more than I wanted to spend.
Another benefit is that I had a grand time playing with hardware. It has been a long time since I have built a machine or anything like it. I came to find out how easy it is to build a DVR. I am listing all the elements of what I ended up with below. It is not the most powerful of machines though it runs quite nicely and meets all of my current needs with the ability to upgrade in the future.
Machine Details:
Enclosure: Antec NSK2400
Power Supply (I replaced the 350w that came with the box): Ultra LS 400w ATX Power Supply
Motherboard: Intel DG41TY
OS: Windows Media Center 2005
Hard drive: Seagate SATA 200 gb drive 7200 rpm
Memory: 2 gb DDR2 600 mhz
Processor: Intel E5200 Dual Core 2.5 ghz
Video Card: EVGA GeForce 9500 GT
Video Capture Card: Hauppauge WinTV-HVR-1850
Keyboard/Mouse: Microsoft Wireless Media Desktop 1000
External Hard Drive: Seagate FreeAgent Xtreme 1tb drive
Network Card: Linksys Wireless-G PCI Adapter WMP54G
DVD Drive: LG 10x BluRay Rewriter BH10LS30
Additional Adapter: Dual ESATA 2 Bracket (for external drive)
Friday, October 2, 2009
Venturing into the world of Virtualization Day 3
The approach that I finally took was that I just restored a new Windows Server 2003 image, shared the drive that had the back up and copied the back up to a virtual drive. I did not want to do a normal restore from the backup because I wanted to make sure that I restored the system state and all that as well. So I changed the virtual server's bios to boot off of a CD and started the install again though this time I was able to go through the normal restore process and find the backup. The problem that I ran into next was that somehow my backup file became corrupted and I kept getting the message that there are miscelaneous characters in the back file and the process could not proceed (or something to that effect). So I was left with rebuilding the server from scratch. Luckily all the important data was stored on a secondary drive and was not lost.
My next venture that I started was to create a new Ubuntu Server from scratch. I am not a Linux expert and it has been a very long time since I went through my Linux courses in college so this will be an experience.
So I downloaded the Ubuntu Server ISO from ubuntu.com. Once it was fully downloaded I then created a small 8gb virtual machine and started it using the ISO as the cd drive. The install went very smooth. No errors or questions that I did not know the answer to.
Next you will see what a Windows tool I am. I got done with the install and the server was just staring at me with a command prompt. I felt very out of my element so I jumped on-line to find out how to launch one of the GUIs that I am sure is available for it. There is a GNOME and a KDE interface available though there seemed to be some concern with security holes when using these. now this is just a play environment so I am not as concerned about security since it will not be outside of my firewall though I decided to follow the advice of many and not load a GUI. I did find quite a few people recommending a website called webmin. Being a web developer, my interest was piqued. I did a search and found a post that someone provided on how to install Webmin (click here). The instructions were great. I did not have any issues and everything installed with out any issues, which is impressive since I really do not know what I am doing in Linux (I know a few things but it has been a long while).
Now that this piece was done I needed to setup the server so that the IP address was not determined by DHCP and that there was an entry in my AD DNS so that I could easily get to the website without having to remember the IP address. I found a good tutorial on how to edit the IP address information (click here). Then I added the CName reference in DNS on my AD server. I then browsed to the website for teh first time and was pretty impressed by what this admin application offered. They were not boasting when they said that there was no need for a GUI and anything you needed to do from a visual perspective was handled by this app. I know that all the hard-core Linux persons probably would not look at this since they love their console, though for me this was a wonderful compromise. Now the default theme was not to my liking though I did find one that I did like and went with that.
My next eperiament is to try to install a new web application that I have recently become aware of that looks very interesting. The application is an open source portal called Liferay. I saw a demo of it the other day and was very impressed by what it can do.
As is my want for most new installs I went on-line and found a website that had some instructions on how to install Liferay on a Ubuntu server (click here). In the instructions they have a shell script that you can download and run. I downloaded it and then uploaded it to the server via my Webmin site, configured it to run as an app and then executed it.
One of the steps in the process involved installing Postfix. This is a mail handling application. I was not sure what some of the options were. I did a search on-line and that did not help much so I kind of guessed. I have an Exchange 2003 environment on my small business server and I wanted to link this up to that. So I selected the "Internet with Smart Host" option which then prompted me to enter the domain and SMTP info for my email server (I am assuming that I selected the right option since based upon these options). So far no errors.
Next I went through the steps to download the files and setup mysql in preperation for the liferay install. No issues with any of those steps thoughI came to find out that the base Ubuntu install does not have a the "unzip" utility installed. Not a big problem. Once I installed it I did not have any issues.
I completed everything in the script and then I switched back to my admin account (it is not good to do too mcuh with the root account) and disabled my root account again.
There were a few more steps on the instructions that needed to be followed after the script was completed. I got to the point where it was time to start the liferay web application and I get an error telling me that I need to set either the JAVA_HOME or JRE_HOME environment variables in order to run this program. I added the entry into the files ~/.bashrc, /etc/bash.bashrc, ~/.profile for the root user as well as my admin account and the process still would not start. I then added the JAVA_HOME entry from the instructions into the start.sh script (which I know is not optimal) and the process started. I am not sure what I was doing wrong though it is working now.
Well, something went wrong. The liferay page displayed once, but is no longer displaying. I am getting a PHP error. I will revisit this later when I have time.