Categories
Geeky/Programming

Top 10 Things To Become A Better Developer

1) Be Connected – Read RSS feeds. MySpace and Facebook aren’t RSS feeds – Scott Guthrie, Raymond Chen, Larry Osterman, CodeBetter.com, Coding Horror, You’ve been Haacked, etc. Don’t know who any of those blogs are? You should. Learn how RSS works, get a RSS Aggregator, subscribe, and read them daily or as time allows. Don’t let it get in the way of your work though. If you are brave enough, create your own blog and get feedback on things you blog about from a technical point of view.

2) Home Computer – what do you have on it? World of Warcraft? How about VS2005/SQL Express editions, or better yet, if you can get the full blown versions. Do you have IIS installed, do you know how to configure asp.net? All of these things are going to get you more into developing. Think to yourself, if I was a car mechanic, would I not have any tools in my garage at home?

3) Home Projects – now that you have your computer set up – come up with some ideas – anything, for a project. Write up the specs yourself. Figure out what you need to do to get it done, and do it.

If you make a windows app, you can get a domain and set up some html for 50$ a year, and put it out for people to download. If it is a web app, you can promote that too. Try to get people to use your app, make apps for friends, family, etc.

4) Become a Hacker – not in the sense of breaking into banks online, but just tinkering with code, programs, anything. think outside the box. become a “reverse engineer specialist”. If you can figure out how to reverse engineer someone else’s code or program, more than likely you are going to be able to easily write the program yourself.

5) Be Committed – you can’t just ride on your laurels. You need to practice and commit time to being a developer. You can’t expect to just do what is expected, you need to do extra effort+ to be great. You should love what you do. Lou Holtz (Notre Dame football coach) once said, the order of things should be this:  God, Family, Football. – just replace football with Developing.

6) Learn the Business – Developers that work for a business are going to thrive if they know as much about the business as possible. You can’t just expect to get a task list or requirement sheet and implement it without knowing why or what for. If you know the business, you can make decisions faster and you will actually be doing more things to help the business. In the end it’s all about the company you work for, not you. Just like a pro sports team – you can be the MVP like Kevin Garnett, but without a team championship, you are always missing something.

7) Work Hard, Play Hard – work your butt off. Make it a game. Tell yourself “no one is going to work harder than i am – ever” – but , when it comes time to play and be social, you need to do that too. The best business people will tell you, it’s not what you do, it’s who you know. You need to make yourself known to people. There is always time for fun, but you need to know where the balance is, and to be great, the scales should tip on the side of work.

8) Confidence – you need to have confidence in yourself. If you get a task that you know you can do, say you can. If you get a task that you can’t do, you need to say you can do it and have confidence you can figure out. Don’t ever say “i can’t”. This will build up your confidence in yourself, as well as the way other people see you. If people start seeing you as someone who always “cant” then they will stop asking you to do anything.

9) Initiative – you need to have drive. This sort of goes along with #3. At work you should see ways to improve things, and instead of just skipping over them, do it. It will help you learn more about the systems you work on, as well as show that you are driven to make things better. If for some reason you are stuck without any tasks, find something you can do, research something new. Twiddling your thumbs waiting for someone to tell you what to do isn’t going to get you anywhere.

10) Be Humble – no one likes someone who toots their own horn. You might be a genius, but if you are an a$$hole, no one will like you. There will always be someone out there better than you. This should give you a sense that you always need to improve. If you are good, people will compliment you and talk about anyways, so there isn’t any need to try to get attention or brag about yourself.

Categories
Geeky/Programming Product Reviews

Trying new RSS Readers

This weekend I decided to try some RSS readers (web only). Currently I use Newsgator Online, so I wanted to see if there was something else out there. I exported my OPML (300 feeds) and looked for some new readers. Tried Bloglines, Google Reader and NetVines. Out of the three, Google Reader seemed the best to me, but not as good as NewsGator online. For some reason I just like it more. There are a few features that they could add, but overall its a good product. Bloglines, I just dont like the look, NetVines, i couldnt figure out how to just show my unread feeds. I’ll stick with Newsgator for now 🙂

Categories
Geeky/Programming

SQL Server 2005 – DDL Triggers – Setting Up Auditing

New with SQL Server 2005, is the ability to set up triggers on DDL statements. This has got to be a DBA’s dream come true. You can set up audit logs on creates/alters, etc. Here is how you do it (this is just a trigger, you will need to create the table, you should be able to get the table definitiion from looking at the trigger)

CREATE TRIGGER [DDL_Auditing] ON DATABASE FOR DDL_DATABASE_LEVEL_EVENTS AS DECLARE @raisedEventData XML /* type date-time spid name name name name name name type command */ -- Capture the event data that is created SET @raisedEventData = eventdata() INSERT INTO dbo.AuditDDL (EventTime,EventType,ServerName,CommandText,LoginName,UserName,ObjectType,ObjectName) SELECT @raisedEventData.value('(/EVENT_INSTANCE/PostTime)[1]', 'nvarchar(100)') AS 'EventTime', @raisedEventData.value('(/EVENT_INSTANCE/EventType)[1]', 'nvarchar(100)') AS 'EventType', @raisedEventData.value('(/EVENT_INSTANCE/ServerName)[1]', 'nvarchar(100)') AS 'ServerName', @raisedEventData.value('(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]', 'nvarchar(MAX)') AS 'CommandText', @raisedEventData.value('(/EVENT_INSTANCE/LoginName)[1]', 'nvarchar(100)') AS 'LoginName', @raisedEventData.value('(/EVENT_INSTANCE/UserName)[1]', 'nvarchar(100)') AS 'UserName', @raisedEventData.value('(/EVENT_INSTANCE/ObjectType)[1]', 'nvarchar(100)') AS 'ObjectType', @raisedEventData.value('(/EVENT_INSTANCE/ObjectName)[1]', 'nvarchar(100)') AS 'ObjectName'

Categories
Geeky/Programming

Static Code Analysis in C/C++

If you ever need to run static code analysis on C/C++ files, you can use Vs2005, but if you are in Vs2003, here is what you can do:

c:Program FilesMicrosoft Visual Studio 8VC>cl /analyze “C:MyCodeFile.c” > c:MyCodeFileAnalysis.txt

Found this on MSDN

Categories
Geeky/Programming

VS2005 – Browser Helper Object (BHO) Tutorial

I have been dabbling with BHO’s for some time, way back with VB6, then tried in .NET, and with C++ as well. There are so many cool things you can do with them. Anyways, most of the documentation out there is sparse and old. I told myself the next time I have to make one, I am going to document it. Well, here it is in all its glory. Sorry if the code formatting is wacked, but you get the picture. I don’t claim to be an expert, but this should work 🙂
just in case, I uploaded it in txt format for better reading here

How to Create a Browser Helper Object in Visual Studio 2005 with C++
———————————————————————
1) Open Visual Studio 2005
2) File->New->Project
3) Visual C++
4) ATL
5) ATL Project
6) Name is whatever you want for this example I use “Company.Browser.Helper” without the quotes

7) The ATL Project Wizard Screen will appear, Hit Finish
8) Visual Studio will load up your project.
9) Right Click on The Company.Browser.Helper project, Add->Class
10) select ATL Simple Object, and click the Add button
11) fill in the ShortName – “BrowserHelper” without the quotes, the rest of the fields should fill in, hit next
12) IMPORTANT: Under Support: Check all boxes (ISupportErrorInfo, Connection points, IObjectWithSite (IE object Support)
13) Click Finish

Now on to the better stuff,

————————————————————–

In visual studio, Solution Explorer, Resource Files, you will see BrowserHelper.rgs, open it and add this to the bottom
(replace the GUID with the GUID that you see at the top of the file like CLSID = s ‘{GUID}’) in the other script code
This will register the BHO with IE when the DLL gets registered


HKLM
{
SOFTWARE
{
Microsoft
{
Windows
{
CurrentVersion
{
Explorer
{
'Browser Helper Objects'
{
{GUID}
}
}
}
}
}
}
}

above where it says ‘Browser Helper’ – you can change those names to be more descriptive, that will show in IE add on manager

————————————————————–

————————————————————–

Categories
Geeky/Programming

Unit Testing Verisign Payflow Pro with VS2005

When you set up payflow pro on a system, you usually are going to use it through the web, you usually dump the certs folder into the inetsrv folder and it works fine. Thing is, when you are using VS2005 Unit Testing, you arent on the web, you can even try setting an HttpContext, but that still doesnt work, you end up with:

Get error “RESULT=-31&RESPMSG=The certificate chain did not validate, no local certificate found, Cert Path = certs, Working Directory = C:ProjectsMyProjectTestResultsuser.name_COMPUTERNAME DateTimeOut”

before you make your request in your tests, do this:
System.Environment.SetEnvironmentVariable(“PFPRO_CERT_PATH”, “c:certs”, EnvironmentVariableTarget.Process);

Copy your certs directory to your C: drive, or you can set the path wherever – mostly likely you would want to add it to your test project, and then set the path when you setup your environment variable as releative to your project.

When you run your unit tests again, you should see a valid response and the request to Verisign should go through correctly.

Categories
Geeky/Programming

Caching got you down? Try an Object Lock

If you are using caching in ASP.net, and when your cache invalidates, you see some really bad performance or race conditions, you probably need to implement object locks.

Categories
Geeky/Programming

Windows ME – Vendor CD, SU0173 Error – What do you do?

So, I needed to install a Windows ME VPC today. I have a Dell CD that has ME on it, so I figured I would use that, and then probably just use my MSDN key or maybe it wouldnt need one. Well it turned into a mini-ordeal.

If you set up a new Microsoft VPC image for ME, and put the CD in, it goes fine, gets to setup, and bam! – SU0173 Error.  Pretty much means,  “you cant use this cd on a pc that isnt by the OEM manufacturer of the computer”. So after a couple minutes digging, found this site which give more information.  I downloaded the precopy1.cab .

Then I download undisker – created an iso from the CD. Got magic ISO going, added precopy1.cab to the iso. Got Microsoft’s virtual cd rom tool, mounted a drive and pointed at my modified ISO. Set my VPC image to boot the newly created virtual cd rom from the ISO, and I would good to go. Now I can use good ol’ ME 🙂

Categories
Geeky/Programming

To Catch or Not To Catch

Earlier today, it came up in discussion, on when to catch exceptions. Really, you end up getting bitten if you just catch exceptions in your code. Basically what happens is that you are using exceptions as flow control, and not using if/end, etc. What usually ends up happening is an exception is getting eaten, but you didnt want it to, and you dont know how your program is reacting to use. ELMAH is great, you should set it up if you are using .NET programming. Also, and it is funny, but this always happens, Scott Hanselman blogged about almost the exact same topic today. And if you can avoid, dont catch a System.Exception – use a more specific exception. If you turn on Code Analysis or run FxCop, it will tell you about that as well.

Categories
Geeky/Programming

New @Home Project: VehicleInfoTracker

I decided to start a new project at home, VehicleInfoTracker. I swooped up the domain, and started building a class library to support what I want to do. Using VS2005, C#, TDD, SQL2005. Have some basic parts done already – registering as a user, registering a vehicle(s) to a user. Working on adding a GasFillup/GasStation object model now. Since I bought my new car, I have been tracking my fillups and saving info on them so I can track my gas milage. We will see where it goes from here.. 🙂